Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
294 views
in Technique[技术] by (71.8m points)

c# - System.DllNotFoundException on Mono SQLite

I've been trying to figure this out lately. It is working on my Windows machine, where I got SQLite from NuGet, but...

When I put System.Data.SQLite.dll and SQLite.Interop.dll straight from my Windows machine into Linux server it says that SQLite.Interop.dll is not found, but I am sure I see it next right to executable.

Then I tried to compile System.Data.SQLite.dll with /p:UseInteropDll=false, but with no luck. This time it says that System.Data.SQLite.dll is not found.

What is this "not found" mystery?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No code changes necessary. You can build it yourself.

  1. apt-get install build-essentials unzip
  2. Download the SQLITE source code - you want the full source code. Currently called sqlite-netFx-full-source-1.0.104.0.zip.
  3. unzip and cd Source,
  4. chmod +x the compile-interop-assembly-release.sh build shell script, then run it ./compile-interop-assembly-release.sh. - It'll build an .so file in the ../bin directory.
  5. Copy this .so file to the directory that has your application in
  6. Run your application as normal.
  7. Note: Ensure that your SQLite database and the directory it's inside of are writable by the user you're trying to run as.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...