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
基础教程推荐
- 从 C# 控制相机设备 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- 如果条件可以为空 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 将数据集转换为列表 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
