简体   繁体   English

System.Data.SQLite.dll-System.IO.FileNotFoundException

[英]System.Data.SQLite.dll - System.IO.FileNotFoundException

I use SQLite and works fine on the developer machine (or machine with Visual Studio). 我使用SQLite,并在开发人员机器(或装有Visual Studio的机器)上正常工作。

But it does not work on PCs without VS. 但是它在没有VS的PC上不起作用。 I "installed" the SQLite manually (32 bit version, added to the references, Copy Local: True). 我手动“安装”了SQLite(32位版本,添加到引用中,“复制本地:True”)。 I get "System.IO.FileNotFoundException" System.Data.SQLite.dll exception. 我收到“ System.IO.FileNotFoundException” System.Data.SQLite.dll异常。

The System.Data.SQLite.dll is in the output folder. System.Data.SQLite.dll在输出文件夹中。

But I can not get it to work only if I install the SQLite with this: https://system.data.sqlite.org/downloads/1.0.105.2/sqlite-netFx46-setup-bundle-x86-2015-1.0.105.2.exe 但是我只有在安装SQLite的情况下才能使它工作: https : //system.data.sqlite.org/downloads/1.0.105.2/sqlite-netFx46-setup-bundle-x86-2015-1.0.105.2 。可执行程序

Dev PC: x64 Win 10, application: x86 only Dev PC:x64 Win 10,应用程序:仅x86

Please let me know if you need any other information. 如果您需要其他任何信息,请告诉我。

Check which dependencies has your executable file (and, maybe, System.Data.SQLite.dll) with Dependency Walker or similar program. 使用Dependency Walker或类似程序检查哪个可执行文件具有可执行文件(可能还有System.Data.SQLite.dll)。 Then put these libraries you found into executable's folder one by one, until your executable will work. 然后将找到的这些库一个一个地放入可执行文件的文件夹中,直到可执行文件起作用为止。

You need to make sure the 64 bit C++ runtime DLLs are getting installed. 您需要确保已安装64位C ++运行时DLL。 They'll often be on the developer's system but not as often installed by your installer on the target system. 它们通常位于开发人员的系统上,但安装程序不会将它们安装在目标系统上。 Even though this is a .NET assembly, it appears to have C++ underpinnings. 即使这是一个.NET程序集,它似乎也具有C ++基础。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM