I am trying to build WinForms Application with SQLite database in Visual Studio 2017, .NET framework 4.6.
I installed SQLite from NuGet.
I have added setup project to install all dlls from reference on user PC.
For me, in Debug and Release mode everything work fine. But when user installed my program he got this:
System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': Such module not found. (Exception from HRESULT: 0x8007007E)
at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op) at System.Data.SQLite.SQLite3.StaticIsInitialized() at System.Data.SQLite.SQLiteLog.Initialize() at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework) at CatFishSystem.Form1.Form1_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl() at System.Windows.Forms.Control.WmShowWindow(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
When I tried to add SQLite.Interop.dll from NuGet I get this error:
Error Could not install package 'SQLite.Interop.dll 1.0.103'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I also tried to download Precompiled Binaries for 64-bit Windows .NET 4.6
from Here and add reference to SQLite.Interop.dll dirrectly. I got this
I'm stuck and don't know what to do. I tried different solutions but none of them helped. Looking forward for your help.
