I just follow the instructions in
SQLite-on-Visual-Studio-with-NuGet-and-Easy-Instructions
and I can compile a C # c sample
"any cpu"
option.
But when I run the application, if I choose
32 bit preferred
my application crashes:
"Unable to load DLL" SQLite.Interop.dll "
If I uncheck the βprefer 32 bitβ option, it works fine on my 64-bit machine.
Why is this happening? Any suggestion to fix this?
PS: I use 64-bit Windows 8. and I provide [x86] and [x64] folders for SQLite.
PS 1: Error:
System.TypeInitializationException: The type initializer for "System.Data.SQLite.SQLiteFactory" made an exception. ---> System.DllNotFoundException: Unable to load DLL "SQLite.Interop.dll": The specified module could not be found. (Exception from HRESULT: 0x8007007E) in System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none (SQLiteConfigOpsEnum op) in System.Data.SQLite.SQLite3.StaticIsInitialized () in System.Data.SQLite.SQLiteLog.Initialize. SQLite.SQLiteFactory..cctor () --- End of internal check for exception stack --- in System.Data.SQLite.SQLiteFactory..ctor ()
PS 3:
I notice an interesting thing. Although it pops up in the visual studio when I launch my exe program, just by clicking on it, it works.
source share