在某些电脑上应用程序无法加载sqlite dll文件 [英] On some computers application can't load sqlite dll file

查看:784
本文介绍了在某些电脑上应用程序无法加载sqlite dll文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个使用sqlite的应用程序,它在大部分系统中的工作非常好。它是用C#编写的,唯一的非框架程序集是sqlite,它由System.Data.SQLite.dll包含。

I wrote an application that uses sqlite and it works great on most of the systems. It is written in C#, and the only non-framework assembly is sqlite, which is included by System.Data.SQLite.dll .

我以相同的方式部署它所有的机器(复制粘贴exe文件,数据库文件和System.Data.SQLite文件)。它对我的所有电脑和大部分我已经尝试过的电脑非常有用。

I deploy it the same way on all of the machines (copy pasting the exe file, the database file and the System.Data.SQLite file). It works great for all my PC's and most of the PC's I've tried.

但是,我有报道说,有些人会抛出以下异常:

But then I've got reports that for some people it throws the following exception:


无法加载文件或程序集
'System.Data.SQLite,Version = 1.0.65.0,
Culture = neutral,
PublicKeyToken = db937bc2d44ff139'或
它的依赖。尝试
加载一个
不正确的格式的程序。

Could not load file or assembly 'System.Data.SQLite, Version=1.0.65.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. An attempt was made to load a program with an incorrect format.

现在我确定了该DLL文件位于与应用程序exe文件相同的文件夹中。这是相同的dll,与上面的异常消息中所述的版本相同。

Now I've made sure the dll file is in the same folder than the application exe file. It's the same dll, with the same version as stated in the exception message above.

我真的很困惑,所以我创建了一个新的虚拟机,安装了Windows 7专业版,只需复制粘贴文件,这个东西就行了。所以如果它在新鲜的窗户上工作,我无法想象其他电脑可能会丢失什么...

I was really confused by this, so I created a fresh virtual machine, installed windows 7 professional on it, and just copy pasted the files, and the thing worked. So if it works on a fresh windows, I can't imagine what the other PC's could be missing...

注意:项目中的两个机器抛出例外也运行Windows 7 proffesional。

Note: Two of those machines where the project throws the exception are also running windows 7 proffesional.

我真的很感谢任何帮助,因为我是新鲜的想法...

I would really appreciate any help on this, because I'm fresh out of ideas...

推荐答案

这里有一个可能性:工作机器与不工作机器之间的差异是32位还是64位?您是否为任何CPU构建,您应该如何构建外部DLL的位置?

Here's a possibility: Is the difference between the working and not-working machines 32-bit vs. 64-bit? Are you building for "Any CPU", when you should be building for just the bitness of your external DLL?

这篇关于在某些电脑上应用程序无法加载sqlite dll文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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