本文介绍了SQLite 参考警告处理器不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从 SQL 服务器更改为 SQLite,一切顺利,一切正常,唯一让我烦恼的是我收到一条关于与 SQLite 参考不匹配的警告,位于警告消息下方:

I just changed from SQL server to SQLite, everything went perfectly fine, everything is working fine, the only thing that bothers me is that I get a warning about a mismatch with the SQLite reference, below the warning message:

警告 1 处理器架构之间存在不匹配的正在构建的项目MSIL"和处理器架构的参考System.Data.SQLite,版本=1.0.84.0,文化=中性,PublicKeyToken=db937bc2d44ff139,processorArchitecture=x86", "x86".这种不匹配可能会导致运行时故障.请考虑更改您的目标处理器架构通过配置管理器进行项目以对齐处理器架构在您的项目和参考文献之间,或采取依赖于具有与项目的目标处理器架构相匹配的处理器架构的引用.LivePigeonClient

我是否安装了错误的参考?还是我真的需要将应用程序的目标设置为 x86?因为那不是我想要的,有没有人有一些关于如何做的建议,以摆脱这个警告?

Did I install the wrong reference? Or do I really need to set the target of my application to x86? Because that is not what I want, does anybody have some suggestions about what to do, to get rid of this warning?

感谢您的时间!

推荐答案

如果您希望使用此 ADO.NET 连接器,则必须指定程序的体系结构.这是因为这个程序集是一个混合模式程序集——它包含本机代码——因此它不能在其他架构下运行.如果您没有为可执行文件指定架构,则运行时将在 64 位机器上使用 64 位实例,并且无法加载引用的程序集.

If you wish to use this ADO.NET connector, you will have to specify the architecture for your program. This is because this assembly is a mixed mode assembly - it contains native code - and thus it cannot run under other architectures. If you do not specify an architecture for your executable, the runtime will use a 64-bit instance on 64-bit machines and the referenced assembly will not be loadable.

这篇关于SQLite 参考警告处理器不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 08:12