Mono SQLite上的System.DllNotFoundException [英] System.DllNotFoundException on Mono SQLite
问题描述
最近我一直在努力弄清这一点.它正在我的Windows机器上运行,我从NuGet那里获得了SQLite,但是...
I've been trying to figure this out lately. It is working on my Windows machine, where I got SQLite from NuGet, but...
当我直接将Windows计算机中的System.Data.SQLite.dll
和SQLite.Interop.dll
放入Linux服务器时,它说未找到SQLite.Interop.dll
,但是我确定可以在可执行文件的右下角看到它.
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.
然后我尝试使用/p:UseInteropDll=false
编译System.Data.SQLite.dll
,但是没有运气.这次它说找不到System.Data.SQLite.dll
.
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?
推荐答案
在Linux上使用Mono.Data.SQLite.dll
.查看Mono手册,以在Linux上使用SQLite 或
Use Mono.Data.SQLite.dll
on Linux. Take a look at the Mono manual to using SQLite on Linux or build the System.Data.SQLite.dll on Mono.
您还可以映射DLL:
<configuration>
<dllmap dll="sqlite" target="libsqlite.so.0" os="linux"/>
<dllmap dll="sqlite" target="libsqlite.0.dylib" os="osx"/>
<dllmap dll="sqlite3" target="libsqlite3.so.0" os="linux"/>
<dllmap dll="sqlite3" target="libsqlite3.0.dylib" os="osx"/>
</configuration>
这篇关于Mono SQLite上的System.DllNotFoundException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!