SQLite Forum

Unable to load DLL 'SQLite.Interop.dll' (0x8007007E) using nuget version of System.Data.Sqlite

I just updated my project to version of System.Data.Sqlite and I got an error when loading SQLite.Interop.dll. I was able to minimize to a simple example, available here https://github.com/andrewhickman/sqlite-repro

To reproduce, run this docker command (using windows containers) on the latest commit in that repository

docker build . -t sqlite-repro ; docker run -it --rm sqlite-repro
I get the following exception

Unhandled exception. System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll' or one of its dependencies: The specified module could not be found. (0x8007007E)
   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.PrivateInitialize(String className)
   at System.Data.SQLite.SQLiteLog.Initialize(String className)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString)
   at SqliteRepro.Program.Main(String[] args) in C:\source\Program.cs:line 10

Running the same command on the previous commit (37ec7a771d30ba1b6a0d506efc7d8ab858852e31), it runs successfully. The only difference is going from version to of System.Data.Sqlite

Just doing `dotnet run` in the repository works fine on both versions on my machine (again using Windows)