c# - 为什么在将 SQLite Nuget 包添加到 LINQPad 时出现 DllNotFoundException?

标签 c# .net sqlite linqpad

我已将 System.Data.SQLite.Core NuGet 包添加到我的 LINQPad 5 查询(高级版),然后尝试执行以下操作:

new SQLiteConnection(":memory:").Dump();

但是我得到:

DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

我如何告诉 LINQPad 在哪里可以找到 SQLite native DLL?

请注意我不想使用 IQ 驱动程序。

最佳答案

此库未以标准方式引用,因为它是 native 的并且需要针对 X86 和 X64 的不同图像。

LINQPad 中的解决方法是找到以下文件夹:

%localappdata%\LINQPad\NuGet.FW46\System.Data.SQLite.Core\System.Data.SQLite.Core.1.0.99.0\build\net46

并将X86X64子文件夹复制到LINQPad.exe所在的文件夹中。

关于c# - 为什么在将 SQLite Nuget 包添加到 LINQPad 时出现 DllNotFoundException?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34816986/

相关文章:

c# - 如何使用 C# 解析 ncx 文件

c# - 使用带有 Regex 的 Linq 删除空匹配项

c# - .NET 中的标准输入和输出

c# - 如何过滤掉catch block

.net - 通过 ElementName 将 UserControl 属性绑定(bind)到其子级会导致绑定(bind)错误

sqlite用户/密码安全

c# - Razor 编译错误

c# - WPF : Set ListViewItem from textblock in the Listview within a DataTemplate

java - 对于 SQLite (Eclipse),将数据库从本地导入到模拟器,反之亦然

ios - sqlite如何处理iOS中的加密?