尝试在C#中使用SQLite时出现DLL找不到错误 [英] DLL not found error when trying to use SQLite in C#

查看:64
本文介绍了尝试在C#中使用SQLite时出现DLL找不到错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C#编码的小型应用程序,可与sqlite数据库配合使用,因此在编译时,我具有已编译的exe + 2个dll:SQLite.Interop.dll和System.Data.SQLite.dll

I have a small app coded in C# that works with a sqlite database, so when compiling I have the compiled exe + 2 dlls: SQLite.Interop.dll and System.Data.SQLite.dll

在我编译它的机器上,它可以完美运行(w7),但是今天我将其移至另一台装有Win XP的机器上,并且在尝试执行它时得到了它(该应用程序尝试捕获了msgbox异常)):

On the machine where I compile this it works perfect (w7), but today i moved it to another machine with win XP and I got this when trying to execute it (the app has a try catch with a msgbox of the exception):

System.DllNotFoundException:无法加载DLL'SQLite.Interop.dll'找不到指定的模块.

System.DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll' The specified module could not be found.

所需的所有dll与exe都位于同一文件夹中,这可能是导致错误的原因吗?

All the dlls needed are in the same folder than the exe, what could be causing the error?

有什么方法可以将dll编译或打包到exe中吗?

Is there any way I could compile or pack the dlls inside the exe?

推荐答案

我建议为x86处理器构建项目,然后重试.

I'd suggest building your project for x86 processors and trying again.

这篇关于尝试在C#中使用SQLite时出现DLL找不到错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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