SQLite Forum

Unable to load dll 'SQLite.interop.dll' after installing my app. The dll is present in the application folder
Login
I've found some similar question to this but not quite the same as mine (they're mostly resolved by ensuring the interop is successfully copied to the correct application folder which is already true in my case).

I have an WPF app with a dependency on SQLite. It works fine on my development machine, both from visual studio (2017) and when installed.

I've built an msi package using InstallShield to install it on customer machines. SQLite.Interop.dll has been included in the files to be copied to the application directory along with System.Data.SQLite.dll and System.Data.SQLite.xml. This appears to run successfully and does copy all of these files into the application folder successfully.  However, when I run the application I get the error in the title. This happens when I make a call to SQLiteConnection.SQLiteVersion but I'm pretty sure this is just because that's the first interaction the app has with SQLite.

The really weird thing is that installing Visual Studio on the target machine makes the problem go away.  My best guess is that there is some underlying dependency that's not being set up on the target machine by my msi but which installing VisualStudio does include, thus resolving the dependency for SQLite.  That's a total guess though.

Can anyone suggest a solution?

Edit> I should add that the application is being built explicitly as x64. I noticed a few people had problems when using AnyCPU but that doesn't apply in my case.