Reputation: 3085
This has been asked before (1, 2), but unfortunately all previous answers are no longer relevant as they are for older version of .NET framework and either do not work anymore, or not supported.
So, my question: Is there a C# wrapper for SQLite that supports .NET 4 etc.
I tried to search but all binarries that I find are either not working, for older versions or commercial :(
As for this ( http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki ), which seems to be what I need it gives me:
Could not load file or assembly 'System.Data.SQLite, Version=1.0.82.0,
Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
I'm using "Precompiled Binaries for 64-bit Windows (.NET Framework 4.0)" for net 4 and for 64 pc.
Upvotes: 3
Views: 2199
Reputation: 403
The devart solution comes in 2 versions, one ($$) with support for ef, nhiberate, etc etc support. The other is free and more basic. Edition comparision: http://www.devart.com/dotconnect/sqlite/editions.html
I dont work for them and havent used this specific product, but I have used other of their software(studio for mysql) and been quite satisified.
Upvotes: 0
Reputation: 137762
Comprehensive lists at http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers (under header '.NET Framework') and http://nuget.org/packages?q=sqlite . Unfortunately, neither pages have comments, so YMMV.
I installed the package System.Data.SQLite (x86/x64) but I got the error
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Upvotes: 0
Reputation: 10544
In fact, you have found the right place already. You problem may comes from you're using the wrong version of System.Data.SQLite.dll, because there are two of them, one for x86, one for x64.
Try use Nuget instead of downloading it manually.
Upvotes: 3
Reputation: 70369
The following libraries work fine AFAIK:
http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki (free)
http://www.devart.com/dotconnect/sqlite/ (commercial)
Upvotes: 0