I created a sample project to test the SQLite-Net + SqliteExtensions NuGet packages. The sample project worked fine, so when I went to refactor an existing project that used System.Data.SQLite by removing that package and installing the previously mentioned ones. As soon as I went to test the refactored project I immediately received an exception saying sqlite3.dll could not be loaded.
'Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)'
This was very interesting to me because the working sample project had no sqlite3.dll in the projects folder. Regardless, I went and downloaded sqlite3.dll and placed it in the root directory of my project that is not working.
After doing that, the exception changed from mentioning sqlite3.dll to the following:
'Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'
The only reason I can think for these issues is that the project that is not working used to have the System.Data.SQLite package installed. (Not anymore.)
How can I fix this?
User contributions licensed under CC BY-SA 3.0