将SQLite Nuget包添加到LINQPad时,为什么会出现DllNotFoundException? [英] Why am I getting DllNotFoundException when adding SQLite Nuget Package to LINQPad?

查看:87
本文介绍了将SQLite Nuget包添加到LINQPad时,为什么会出现DllNotFoundException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I have added the System.Data.SQLite.Core NuGet package to my LINQPad 5 Query (Premium) and then try to execute the following:

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

但是我得到了

DllNotFoundException:无法加载DLL'SQLite.Interop.dll': 找不到指定的模块. (来自HRESULT的异常: 0x8007007E)

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

如何告诉LINQPad在哪里可以找到SQLite本机DLL?

How can I tell LINQPad where to find the SQLite Native DLLs?

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

Please note I do not want to use the IQ Driver.

推荐答案

该库未以标准方式引用,因为它是本机库,并且需要用于X86和X64的不同映像.

This library is not referenced in the standard way, because it's native and requires different images for X86 and X64.

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

A workaround in LINQPad is to locate the following folder:

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

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

and copy the X86 and X64 subfolders into the folder where LINQPad.exe is located.

这篇关于将SQLite Nuget包添加到LINQPad时,为什么会出现DllNotFoundException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆