且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

64位生成错误

更新时间:2023-08-26 09:05:28

该错误消息表明其中一个程序集正在引用以x86为目标构建的组件。 如果您运行x64应用程序(64位),则所使用的每个程序集必须定位到AnyCPU或x64。 任何本机代码(即:一个包装的COM对象,或通过P / Invoke调用的DLL)也必须编译为64位DLL。

项目中的一个DLL,或者由项目引用,仍然是针对x86。
That error message suggests that one of the assemblies is referencing a component that was built targetting x86.  If you run an x64 application (64bit), every assembly used must be targetting either AnyCPU or x64.  Any native code (ie: a wrapped COM object, or a DLL invoked via P/Invoke) must also be compiled as a 64bit DLL.

One of the DLLs in your project, or referenced by your project, is still targetting x86.