0

I created c# app which was successfully built and released (the application is using local SQLite database).

Scenario 1 (It works). I copied the Release folder to a client's machine and the application worked properly when I ran .exe file from the folder. Just to mention, I also copied SQLite database file along with Release folder and set up the new path to db file in config file.

Scenario 2 (This doesn't work) When I published the application I couldn't run it after the setup process was completed due to this error: "Unable to Load SQLite.Interop.dll". I also tried to set up the new path to db file in config file as I did in Scenario 1. Is this necessary after the setup process is finished?

My Release folder has two subfolders - x64 and x86 with SQLite.Interop.dll in each of them. But I don't see these folders in my Publish folder in the Applications files. I tried to copy these folders from Release folder to Publish folder manually but it hasn't solved my problem.

Can someone workaround this and explain me how I can force Visual Studio to copy SQLite.Interop.dll to my Publish folder as it happens when I debug the program (I guess this is the cause of my problem)? If someone knows please explain me that in details since I'm working this for the first time.

I checked the next topic with the similar question but I couldn't fix this based on the instructions given there ("Unable to load DLL 'SQLite.Interop.dll' error on client machine).

Community
  • 1
  • 1
Laki
  • 99
  • 1
  • 3
  • 15

2 Answers2

2

copy folders (x64 and x86) to your project Copy/Paste include them to project then -> right click in the items inside the folder -> properties -> then change Copy to output -> copy if newer

enter image description here

0

Thank you for answering. It gave me an idea how to workaround this. I copied x86 and x 64 folders to the output folder but then I bumped to the new issue - my config file had a different computed hash than specified in manifest.

I decided to got away from publishing and decided for another option - to create setup file (https://www.youtube.com/watch?v=z0v6hmumCFU). Once the setup was created and application was installed, I manually copied x86 and x64 folders to the application folder (where the application was installed). The final step was to set up a new path to the SQLite database in config file of the application.

Laki
  • 99
  • 1
  • 3
  • 15