using System.Data.SQLite on Linux / ".Net Core 2"

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

using System.Data.SQLite on Linux / ".Net Core 2"

Larry Brasfield
Is there a build of System.Data.SQLite which runs on .Net Core 2.0 when
used on a Linux platform?

Using Powershell 6 installed on my Ubuntu 16 LTS box, I can do
    Add-Type -Path ./System.Data.SQLite.dll
(which loads the assembly) without issues, (on Linux or Windows), but this
    $c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Data
Source=$home/silly.sdb"
fails with error information reading:
New-Object : Exception calling ".ctor" with "1" argument(s): "Unable to
load shared library 'SQLite.Interop.dll' or one of its dependencies. In
order to help diagnose loading problems, consider setting the LD_DEBUG
environment variable: libSQLite.Interop.dll: cannot open shared object
file: No such file or directory"
At line:1 char:6
+ $c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Da ...
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [New-Object],
MethodInvocationException
+ FullyQualifiedErrorId :
ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand

I imagine that I need the interop DLL from the Mono build mixed with the
System.Data.SQLite assembly which targets .Net Core 2.0, but it is unclear
(to me) how to set this up.

Any insights are most welcome.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: using System.Data.SQLite on Linux / ".Net Core 2"

Joe Mistachkin-3

Yes.  Currently, there are binaries that support Windows, Linux, and MacOS in the “System.Data.SQLite.Core” NuGet package:

https://www.nuget.org/packages/System.Data.SQLite.Core

Sent from my iPhone

> On Jul 21, 2019, at 1:27 PM, Larry Brasfield <[hidden email]> wrote:
>
> Is there a build of System.Data.SQLite which runs on .Net Core 2.0 when
> used on a Linux platform?
>
> Using Powershell 6 installed on my Ubuntu 16 LTS box, I can do
>    Add-Type -Path ./System.Data.SQLite.dll
> (which loads the assembly) without issues, (on Linux or Windows), but this
>    $c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Data
> Source=$home/silly.sdb"
> fails with error information reading:
> New-Object : Exception calling ".ctor" with "1" argument(s): "Unable to
> load shared library 'SQLite.Interop.dll' or one of its dependencies. In
> order to help diagnose loading problems, consider setting the LD_DEBUG
> environment variable: libSQLite.Interop.dll: cannot open shared object
> file: No such file or directory"
> At line:1 char:6
> + $c = New-Object System.Data.SQLite.SQLiteConnection -ArgumentList "Da ...
> +      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo          : InvalidOperation: (:) [New-Object],
> MethodInvocationException
> + FullyQualifiedErrorId :
> ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
>
> I imagine that I need the interop DLL from the Mono build mixed with the
> System.Data.SQLite assembly which targets .Net Core 2.0, but it is unclear
> (to me) how to set this up.
>
> Any insights are most welcome.
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users