System.DllNotFoundException on Mono SQLite(Mono SQLite 上的 System.DllNotFoundException)
问题描述
我最近一直在尝试解决这个问题.它正在我的 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...
当我将 System.Data.SQLite.dll 和 SQLite.Interop.dll 从我的 Windows 机器直接放入 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 或 在 Mono 上构建 System.Data.SQLite.dll.
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Mono SQLite 上的 System.DllNotFoundException
基础教程推荐
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- WPF 模态进度窗口 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
