0

I have a working windows form application (C# .NET 4) using an SQLite3 Database file for storing and reading data.

When i deploy the application on the any machine other then the dev machine, i get an exeption: "System.IO.FileNotFoundException: Could not load file or assembly"

I have tried changing various settings, manually loading the dll (Assembly.LoadFile aswell as Assembly.LoadFrom) and placing the dll files next to the exe. Also, i have tried running the application under x86 aswell as x64 and under different target platforms.

I have tried using Could not load assembly System.Data.SQLite.dll All without luck.

Please help

Community
  • 1
  • 1
user2122855
  • 1
  • 1
  • 1

4 Answers4

2

You also need to copy System.Data.SQLite.Linq.dll and System.Data.SQLite.DLL to the deployed exe folder.

Tianyun Ling
  • 1,045
  • 1
  • 9
  • 24
2

'System.Data.SQLite.dll" requires "msvcr100.dll" which is one of it's Dependencies. This will be available only if you installed latest "Microsoft Visual C++ Redistributable" or any other product which internally provides this.

For example, VS2010 will install C++ Redistributable by default.You could try pasting the "msvcr100.dll" in your application bin folder and distribute if you dont want to install VC++ 2010 Redist in all the PC's.

Murugan
  • 1,441
  • 1
  • 12
  • 22
1

I faced same problem on moving my application from .NetFramework to .NetCore. Later downloading a .NetCore supported .NetStandard2.0 sqlite version downloaded from http://system.data.sqlite.org/index.html/artifact/99229e8a9f2b2617 solved the issue. Better to try downloading and see if things would work. Also check for inner exceptions if any and resolve them

Krishna Prasad S
  • 141
  • 2
  • 17
0

What version of Visual Studio are you using? Perhaps your answer lies in SQLite with VS 2010 ...

Community
  • 1
  • 1
Nick
  • 1,441
  • 11
  • 22