I am getting the following error in my Web project in Visual Studio 2017:
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Now, I have read ALL of the other StackOverflow questions with the same or similar titles and NONE of the mentioned solutions have worked for me.
The strangest thing is that the SQLite.Interop.dll file is inside my \bin folder and inside both x86 and x64.
Fusion log is enabled but it doesn't seem to pick this up at all.
It "feels" to me like something is being cached by my IIS.
Here is some more detail about my environment and what I'm doing:
- I am using IIS 10.0.17134.1
- Running on Windows 10 build 17134.523
- Using Visual Studio 2017 (15.8.6)
- .Net project configured to use .Net 4.6.1
- The culprit call is to NHibernate (5.2.3)
Configuration.BuildSessionFactory()
- My project uses FluentNhibernate and many other nuget packages.
- I'm only using the Sqlite Nuget package System.Data.SQLite.Core version 1.0.109.2
Further, I've got a base project where this actually works.
I am converting this to a Visual Studio template, exporting it and then I create a new project of my custom visual studio template type.
It is this newly created project that does not want to work. In fact, when i run the first time, visual studio downloads all the nuget packages but does not copy the sqlite.interop.dll files over.
Only when I re-build the solution a second time, does it copy the files over.
But I still get the error.
So I want to emphasize, the actual dll's (SQLite.Interop.dll) do exist in the bin directory, and the IIS website is hosted in that directory.
But I still get this error.
Is there any reason why this is happening??
I have a feeling it might be related to the Visual Studio template, but i can't see any difference with my manually created project and the template created one. But I would think this is sort of besides the point, why am I getting the error?
Any help is appreciated.
Temporary ASP.NET Filesfolder when IIS is running the website? - Florian Lim