首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法使用devenv编译vdproj -‘目标'x64’‘与项目的目标平台’x86‘不兼容

无法使用devenv编译vdproj -‘目标'x64’‘与项目的目标平台’x86‘不兼容
EN

Stack Overflow用户
提问于 2011-08-05 20:53:51
回答 9查看 43.2K关注 0票数 32

在过去的几个小时里,我一直在网上搜索,找到了很多与我的问题相关的信息--但都没有真正解决这些问题。

我的机器是64位的,安装了32位的Visual Studio 10。解决方案使用.Net 4。解决方案包括64位安装水晶报表。解决方案还包括log4net。

在VS2010中编译项目对于调试和发布都是可以的,任何cpu都可以。

我已经添加了一个要构建的Web安装项目。然而,无论配置如何,在编译时(在VS中和使用devenv.exe的命令行中),我都会遇到以下错误:

代码语言:javascript
复制
ERROR: File 'CrystalDecisions.ReportAppServer.Prompting.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.Prompting.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ObjectFactory.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ObjectFactory.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.XmlSerialize.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.XmlSerialize.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommonObjectModel.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommonObjectModel.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommonControls.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommonControls.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ReportDefModel.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ReportDefModel.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'log4net.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'log4net.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.Controllers.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.Controllers.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.DataDefModel.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.DataDefModel.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CubeDefModel.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CubeDefModel.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.ClientDoc.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.ClientDoc.dll' targeting 'x64' is not compatible with the project's target platform 'x86'
ERROR: File 'CrystalDecisions.ReportAppServer.CommLayer.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
WARNING: File 'CrystalDecisions.ReportAppServer.CommLayer.dll' targeting 'x64' is not compatible with the project's target platform 'x86'

我尝试将项目的配置显式地设置为x86和x64,而不做任何更改。

有人能给我指引正确的方向吗?

编辑-添加的屏幕截图显示我无法为安装项目选择平台。

EN

回答 9

Stack Overflow用户

回答已采纳

发布于 2011-08-05 21:17:44

您必须将安装项目标记为64位安装程序。在“属性”窗口中,将安装项目的TargetPlatform属性从x86 (缺省值)更改为x64。

还要确保您部署的是64位版本的log4net,并且您的C#项目的TargetPlatform设置为Any CPU。

并确保您的应用程序实际上需要作为64位进程运行,这是很少见的。

票数 65
EN

Stack Overflow用户

发布于 2012-01-19 03:17:18

  1. 在记事本中打开Deployment.vdproj。
  2. 查找字符串"TargetPlatform“=”3:0“
  3. 更改为"TargetPlatform”= "3:1“(对于AMD64 )或"TargetPlatform”= "3:2“(对于安腾)。
  4. 保存Deployment.vdproj。在Visual Studio中你看不到任何变化,但是你的项目现在是AMD64。
票数 23
EN

Stack Overflow用户

发布于 2011-12-21 18:59:47

  1. 打开部署项目。
  2. 在解决方案资源管理器中,选择部署项目。
  3. 在属性窗口中,选择TargetPlatform安腾(对于英特尔安腾64位平台)或x64 (对于任何其他64位平台(如AMD64和EM64T指令集))。
  4. 在安装时,如果目标计算机与指定的平台不兼容,则会引发错误并停止安装。
票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6956601

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档