0

I have build Wix 3.7 setup project. To modify SQLite DB during installation I use custom action. But installation throws an error:

Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

How can I modify setup project to eliminate this problem?

Martin Evans
  • 45,791
  • 17
  • 81
  • 97

1 Answers1

0

Use a C# custom action to do the work, and include the SQLite.Interop.dll as a reference in your custom action project. Set the CopyLocal property on the DLL reference to true. This is all assuming, of course, that SQListe.Interop.dll is managed code.

Rich Stephens
  • 71
  • 1
  • 7
  • I try this, but error remains. I modify my solution. I create small console application a I add it to installation. And custom action calls the exe file and then deletes it. – Martin Grena Mar 17 '16 at 16:11
  • Rather than creating a separate console application, what I was referring to was creating an actual C# custom action method and doing the work in there, as described here: http://www.advancedinstaller.com/user-guide/qa-c-sharp-ca.html – Rich Stephens Mar 18 '16 at 16:49
  • I use C# custom action, via NuGet I was add System.Data.Sqlite Core (x86/x64), on System.Data.Sqlite reference I set property Copy Local to true. But during installation occures described error. – Martin Grena Mar 21 '16 at 06:36
  • Have you tried adding the dll as a Binary element to your WiX XML file, just like the custom action DLL is? – Rich Stephens Mar 23 '16 at 16:50
  • Thanks for your advice. I solve this problem with external configuration application. It is better for me. This solution allows me to solve more problems with post install configuration of my application. – Martin Grena Mar 25 '16 at 12:25
  • Hi Martin. I am also getting same error when i am migrating my vdproj to wix installer. Inold application after install event there were some sql lite db creation which i am trying to do via custom action. Can you share how your xml file of wix installer look like after adding binary – Kamran Shahid Oct 25 '17 at 07:37