.Net Core 2.0 SQLite3 "Unable to load DLL 'e_sqlite3'"

0

Working on a .Net Core Web App that I'm deploying to IIS.

I had already deployed it before, and was working fine before, but I needed to add a light touch of persistence to the application, and since the data from this app is only ever used inside the app, and no two installs will ever need to be connected, I decided on Sqlite.

However, when I finished implementing the Sqlite code to my app, I deployed to IIS again, and found that nothing is working. Mainly because I get this horrendous call stack. The Gist is that e_sqlite3 isn't available to load at run-time, and it's not built into the app, or the assemblies.

Hosting environment: Production Content root path: D:\MFS Now listening on: http://localhost:31054 Application started. Press Ctrl+C to shut down. fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HLGNAK78DM3Q", Request id "0HLGNAK78DM3Q:00000001": An unhandled exception was thrown by the application. System.TypeInitializationException: The type initializer for 'Microsoft.Data.Sqlite.SqliteConnection' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL 'e_sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number() at SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number() at SQLitePCL.raw.SetProvider(ISQLite3Provider imp) at SQLitePCL.Batteries_V2.Init()

How can I force it to get bundled? (or at least copied when I publish through WebDeploy?)

c#
asp.net-core

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0