SQLite Forum

System.DllNotFoundException on MonoDevelop

System.DllNotFoundException on MonoDevelop

(1) By BanditoWalrus on 2021-06-27 17:18:32 [link] [source]

So I had a project used SQLite originally made with Visual C# 2010 Express on Windows 7. For a number of reasons I have had to port this project into MonoDevelop on Linux. Now I'm getting a mysterious error that I wasn't getting back on the VS/Windows version, appearing when I just try to open up the SQLite connection. The error message I'm getting is cryptic:

System.DllNotFoundException System.Data.SQLite.dll assembly: <unknown assembly> type:<unknown type> member:(null)

Has anyone ever encountered a problem like this before or have any idea how to resolve it?

(Or does anyone else have experience using SQLite with MonoDevelop in general?)

(2) By Larry Brasfield (larrybr) on 2021-06-27 20:08:03 in reply to 1 [source]

I have not had that specific problem, but I'm going to venture a guess as to its cause and suggest a remedy based on that guess. If the remedy solves your problem, the guess is confirmed; otherwise that experiment may inform later investigation.

My guess is that System.Data.SQLite.dll is not located in a place known to the running Mono VM when it runs your executable, and therefore cannot be loaded. The remedy is to locate that DLL and place it or a copy in the same directory as your application executable.