I am using Visual Studio 2010, with the Votive addin on Windows 7, .net4, and the latest WiX 3.7 to create an msi.
The install is quite complex, and works fine when I test it on my pc.
During the install, I run some custom actions. One of those custom actions needs an external SQLite dll for database access that is only required by the custom action.
When I run it on a pc that doesn't have my dev environment, just plain windows 7, I get a file not found error. This, it would seem obvious is because SQLite has not been installed on this pc.
The error I get is:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. The specified module could not be found.
I can see from the verbose log that the custom action is being extracted to a temp file locally to run. This is an extract from the log file:
(SERVER) MSI (s) (74:C0) [09:08:07:527]: Executing op: ActionStart(Name=InitializeDbDeferred,,)
(UNKNOWN) Action 09:08:07: InitializeDbDeferred.
(SERVER) MSI (s) (74:C0) [09:08:07:528]: Executing op: CustomActionSchedule(Action=InitializeDbDeferred,ActionType=1025,Source=BinaryData,Target=InsertDefaultRepositoryDeferred,CustomActionData=DATA=C:\AXS Standalone NVR;REPOSITORYPATH=C:\AXS Repository - (Available Space: 364 (Gb));QUOTA=25)
(SERVER) MSI (s) (74:88) [09:08:07:530]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI4252.tmp, Entrypoint: InsertDefaultRepositoryDeferred
(UNKNOWN) SFXCA: Extracting custom action to temporary directory: C:\Users\Admin\AppData\Local\Temp\MSI4252.tmp-\
(UNKNOWN) SFXCA: Binding to CLR version v4.0.30319
(UNKNOWN) Calling custom action CustomAction!CustomAction.CustomAction.InsertDefaultRepositoryDeferred
(UNKNOWN) Exception thrown by custom action:
(UNKNOWN) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite.dll' or one of its dependencies. The specified module could not be found.
(UNKNOWN) at CustomAction.CustomAction.InsertDefaultRepositoryDeferred(Session session)
(UNKNOWN) --- End of inner exception stack trace ---
My question is, how do I get the Custom Action to 'see' the SQLite dll during the install when the CA is being run from a temp location? Do I have to 'package the CA and it's dlls together somehow.
I have tried including the SQLite dll as a file in the installer, but the CA in the temp location would not 'know' where it was.
I just can't see how to get the CA to find the SQLite dll.