在最终用户计算机上安装Sqlite [英] Installing Sqlite on end user Machine

查看:111
本文介绍了在最终用户计算机上安装Sqlite的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我有一个非常令人困惑的问题,我无法深究。

我开发了一个Windows窗体应用程序,当我在本地运行时,即通过visual studio它运行完美没有任何问题,但当我将它部署到最终用户的机器时,我得到以下错误。



System.BadImageFormatException:无法加载文件或程序集'System.Data。 SQLite,Version = 1.0.66.0,Culture = neutral,PublicKeyToken = db937bc2d44ff139'或其依赖项之一。尝试加载格式不正确的程序。

文件名:'System.Data.SQLite,Version = 1.0.66.0,Culture = neutral,PublicKeyToken = db937bc2d44ff139'



我似乎无法弄清楚为什么我会收到此错误或如何解决它。



最终用户机器也是x64位,我在dll的属性中将copy local设置为True。



任何帮助都是非常苛刻的。



谢谢

Hey Guys, I have a really confusing problem which I can't get to the bottom of.
I have developed a windows forms application which when I run locally i.e through visual studio it runs perfectly without any issues but when I deploy it to the end user's machine I get the below error.

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

I can't seem to figure out why I get this error or how to resolve it.

The end user machine is x64 bit also and I have set copy local to True in the properties of the dll.

Any help is very much apreciated.

Thanks

推荐答案

也许是这个支持链接 [ ^ ]可能会有所帮助吗?



之前我遇到过这种情况,如果您的主应用程序设置为目标AnyCPU并且您有一个针对x86或x64的DLL,它可能会给出异常,因为它在与DLL不同的处理器目标,即使它在开发上运行良好nt computer。



还要确保目标计算机上有正确版本的.NET。
Maybe this support link[^] might help?

I've run into this before, if your main application is set to target AnyCPU and you have a DLL that is targeted as x86 or x64 it may give the exception because its loading in a different processor target than the DLL even though it runs fine on the development computer.

Also make sure that the target computer has the correct version of .NET on it.


这篇关于在最终用户计算机上安装Sqlite的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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