VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

时间:2022-09-01 07:43:57
自己编了一个winform的上位机界面,其中调用的动态库都是x64的。调试时“目标平台”选为x64,“平台(M)”选为x86,然后调试没问题。但到发布程序时,就提示了上面的类似错误。错误中提到“与项目的目标平台“x86”不兼容”,这意思是我的目标平台还是x86吗?可我的“目标平台”选择的是x64呀?

VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

以上设置不行,我又改为如下设置,还是不行。

VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容
VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容
VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容


麻烦各位了,谢谢呀。

8 个解决方案

#1


换换报错的dll,用x86的代替,上位机上一般用的库很少

#2


都选x86的试试,估计你是32位系统

#3


引用 1 楼 daiqianjie 的回复:
换换报错的dll,用x86的代替,上位机上一般用的库很少


可是我的上位机以后必须在64位系统上运行,所以要把它发布成一个面向x64平台的。我现在的系统也是64位的

#4


引用 2 楼 strWangFan 的回复:
都选x86的试试,估计你是32位系统


我系统是64位的 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

#5


生成X86就可以啊
64位上也可以用的
但是你64的肯定再32上是跑步起来的

#6


问题已经解决了。
参考:http://*.com/questions/6956601/unable-to-compile-vdproj-with-devenv-targeting-x64-is-not-compatible-with-t

方法一:
1.Open Deployment.vdproj, in Notepad.
2.Find string "TargetPlatform" = "3:0"
3.Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
4.Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.

方法二:
1.Open a deployment project.
2.In the Solution Explorer, select the deployment project.
3.In the Properties window, select the TargetPlatform property.
4.Choose either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).
5.At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

英语不好,我就不翻译了,免得出丑,大概懂啥意思就行了 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

#7


引用 6 楼 ha1wa1er 的回复:
问题已经解决了。
参考:http://*.com/questions/6956601/unable-to-compile-vdproj-with-devenv-targeting-x64-is-not-compatible-with-t

方法一:
1.Open Deployment.vdproj, in Notepad.
2.Find string "TargetPlatform" = "3:0"
3.Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
4.Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.

方法二:
1.Open a deployment project.
2.In the Solution Explorer, select the deployment project.
3.In the Properties window, select the TargetPlatform property.
4.Choose either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).
5.At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

英语不好,我就不翻译了,免得出丑,大概懂啥意思就行了 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

你好,请问你最后是怎么解决这个的呢?我也碰到了,自己摸索了很久,还是没弄好,

#8


左键单击建立的部署项目,在其属性栏里,杂项,有“TargetPlatform”项,修改此项部署对应的平台类型~

#1


换换报错的dll,用x86的代替,上位机上一般用的库很少

#2


都选x86的试试,估计你是32位系统

#3


引用 1 楼 daiqianjie 的回复:
换换报错的dll,用x86的代替,上位机上一般用的库很少


可是我的上位机以后必须在64位系统上运行,所以要把它发布成一个面向x64平台的。我现在的系统也是64位的

#4


引用 2 楼 strWangFan 的回复:
都选x86的试试,估计你是32位系统


我系统是64位的 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

#5


生成X86就可以啊
64位上也可以用的
但是你64的肯定再32上是跑步起来的

#6


问题已经解决了。
参考:http://*.com/questions/6956601/unable-to-compile-vdproj-with-devenv-targeting-x64-is-not-compatible-with-t

方法一:
1.Open Deployment.vdproj, in Notepad.
2.Find string "TargetPlatform" = "3:0"
3.Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
4.Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.

方法二:
1.Open a deployment project.
2.In the Solution Explorer, select the deployment project.
3.In the Properties window, select the TargetPlatform property.
4.Choose either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).
5.At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

英语不好,我就不翻译了,免得出丑,大概懂啥意思就行了 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

#7


引用 6 楼 ha1wa1er 的回复:
问题已经解决了。
参考:http://*.com/questions/6956601/unable-to-compile-vdproj-with-devenv-targeting-x64-is-not-compatible-with-t

方法一:
1.Open Deployment.vdproj, in Notepad.
2.Find string "TargetPlatform" = "3:0"
3.Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
4.Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.

方法二:
1.Open a deployment project.
2.In the Solution Explorer, select the deployment project.
3.In the Properties window, select the TargetPlatform property.
4.Choose either Itanium for an Intel Itanium 64-bit platform, or x64 for any other 64-bit platform (such as AMD64 and EM64T instruction sets).
5.At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

英语不好,我就不翻译了,免得出丑,大概懂啥意思就行了 VS2010发布windows应用程序时提示:面向“x64”的文件“**.dll”与项目的目标平台“x86”不兼容

你好,请问你最后是怎么解决这个的呢?我也碰到了,自己摸索了很久,还是没弄好,

#8


左键单击建立的部署项目,在其属性栏里,杂项,有“TargetPlatform”项,修改此项部署对应的平台类型~