mardi 22 mars 2016

SQLite3.dll cannot be used in C# application in VS2013 ON WIN 7

I need to access SQLite3.dll for my application (x64) C# in VS2013 on win7.

From SQLite: sqlite3.dll vs System.Data.SQLite.dll?

I see that

 "The sqlite3.dll is unmanaged code containing the databae engine itself and it is embedded as resource inside the managed System.Data.SQLite assembly. "

So, I installed System.Data.SQLite.x64 from package manager:

PM> Install-Package System.Data.SQLite.x64
Attempting to resolve dependency 'System.Data.SQLite.Linq (≥ 1.0.99.0)'.
Attempting to resolve dependency 'System.Data.SQLite.EF6 (≥ 1.0.99.0)'.
Attempting to resolve dependency 'EntityFramework (≥ 6.0.0.0)'.
'System.Data.SQLite.x64 1.0.99.0' already installed.
My_project already has a reference to 'System.Data.SQLite.x64 1.0.99.0'.

I added it as a reference in VS2013. But, I got error:

  An unhandled exception of type 'System.DllNotFoundException' occurred in Devart.Data.SQLite.dll

 Additional information: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Then, I downloaded Sqlite3.dll (x64) from http://ift.tt/UeQUv3

I put Sqlite3.dll and Sqlite3.def at bin/Debug and added it as a content file and changed its property of local copy to "copy always" but I got error.

 An unhandled exception of type 'Devart.Data.SQLite.SQLiteException' occurred in Devart.Data.SQLite.dll

 Additional information: Assembly that contains embedded dotConnect for SQLite license cannot be used with this application: my_app.exe

The link does not help either, Could not load file or assembly 'System.Data.SQLite'

Any suggestions ? Thanks.



SQLite3.dll cannot be used in C# application in VS2013 ON WIN 7

Aucun commentaire:

Enregistrer un commentaire