1
votes

I am trying to access the database from a custom action.However the connection is failing with a message "Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)".I want to know that where does a custom action looks for the SQLite.Interop.dll,while connecting to the database from within a custom action.The SQLite.Interop.dll is present in my install folder after installation as I have added it as a component in the product.wxs.

1
Haven't looked at this before that I recall, but there seems to be lots of previous questions about it. Here is one: Visual Studio C# - SQLite.Interop.dll not found, and one more: Unable to load DLL 'SQLite.Interop.dll'Stein Åsmul
Thanks @SteinÅsmul but I could not find a solution to the problem stated above.Hence, I changed my approach.Now,I am using the database from inside the application instead of the custom action.If you find a solution, please update me.user11350030
@SteinÅsmul, I have built basic installers for the application using wix toolset and in case of upgrade I change the version from 1.0.0.0 to 2.0.0.0.However, if I do the same thing with the current application, the earlier installed version disappears and the second version is not installed. I use the word disappear because I have scheduled custom action on uninstall of first application,the custom action does not get executed when I try installing the new version,. But I have nothing in control Panel as installed and all my folders related to the app are deleteduser11350030
I commented my custom actions and it worked fine.But how to make it work with custom actions?user11350030
I figured out the reason, the update was not working with the custom action because the custom action in the installed application was getting executed when I was trying to install the update and for some strange reason instead for the update, my earlier application was disappearing and the new one was not getting installed.Now when I have scheduled the custom action to run only during install the application is getting updated.user11350030

1 Answers

1
votes

To give you a hint Sqlite.Interop.dll are under x86 and x64 folders and somehow Wix does not pick up subfolders under the CustomAction's bin folder. You need to somehow have these two folders install under C:\Windows\Installer\xxxxxfolder where you custom actiondllfiles are copied during install. The problem I am having is that I cannot find the variable for that temp folder underC:\Windows\installer(that is different thanC:\User\Temp...`).

Reference: Program Unable to Load DLL 'SQLite.Interop.dll' after WiX Installation