无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

时间:2021-08-12 05:30:37

I've been searching around the web for the past hours, finding a lot of information related to my problem - but none actually fixing them.

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

My machine is 64 bit with a 32 bit Visual Studio 10 installed. Solution uses .Net 4. Solution includes 64 bits installation of Crystal Reports. Solution also includes log4net.

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

Compilation of project in VS2010 is OK for both Debug and Release, any cpu.

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

I have added a Web Setup Project that I want to build. However, no matter the configuration I get the following errors when compiling (both within VS UI and command line using devenv.exe):

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

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'

I have tried to explicitly set the configuration for the projects to both x86 and x64, without any change.

我试图明确地将项目的配置设置为x86和x64,没有任何更改。

Can someone guide me on the right way?

有人能引导我走正确的路吗?

Edit - added screenshot showing that I am unable to choose platform for the setup project.

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

无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

7 个解决方案

#1


50  

You have to mark the Setup project as a 64-bit installer. Your Setup project's TargetPlatform property in the Properties window, change it from x86 (the default) to x64.
Also make sure you deploy the 64-bit version of log4net and that your C# project's TargetPlatform setting is Any CPU.
And make sure that you actually need your app to run as a 64-bit process, that's rare.

您必须将安装项目标记为64位安装程序。在属性窗口中设置项目的TargetPlatform属性,将它从x86(默认)改为x64。还要确保部署64位版本的log4net,并且您的c#项目的TargetPlatform设置是任何CPU。确保你的应用程序需要运行为64位程序,这是很少见的。

#2


15  

  1. Open Deployment.vdproj, in Notepad.
  2. 打开部署。vdproj记事本。
  3. Find string "TargetPlatform" = "3:0"
  4. 查找字符串"TargetPlatform" = "3:0"
  5. Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
  6. 更改为AMD64的“TargetPlatform”= "3:1",或"TargetPlatform" = "3:2"的Itanium。
  7. Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.
  8. 拯救Deployment.vdproj。在Visual Studio中,您看不到任何更改,但是您的项目现在是AMD64。

#3


6  

  1. Open a deployment project.
  2. 打开部署项目。
  3. In the Solution Explorer, select the deployment project.
  4. 在解决方案资源管理器中,选择部署项目。
  5. In the Properties window, select the TargetPlatform property.
  6. 在属性窗口中,选择TargetPlatform属性。
  7. 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).
  8. 为一个Intel Itanium 64位平台选择Itanium,或者为其他64位平台选择x64(如AMD64和EM64T指令集)。
  9. At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.
  10. 在安装时,如果目标计算机与指定的平台不兼容,将会引发错误并停止安装。

#4


1  

  1. Open a deployment project.
  2. 打开部署项目。
  3. In the Solution Explorer, select the deployment project.
  4. 在解决方案资源管理器中,选择部署项目。
  5. In the Properties window, select the TargetPlatform property.
  6. 在属性窗口中,选择TargetPlatform属性。
  7. 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).
  8. 为一个Intel Itanium 64位平台选择Itanium,或者为其他64位平台选择x64(如AMD64和EM64T指令集)。

At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

在安装时,如果目标计算机与指定的平台不兼容,将会引发错误并停止安装。

#5


0  

You may need an x64 Windows Service installed (think powershell) that needs to communicate to an x86 application. Your answer (properties/TargetPlatform) got me over that hurdle.

您可能需要安装一个x64 Windows服务(想想powershell),它需要与x86应用程序通信。你的答案(属性/目标平台)让我克服了这个障碍。

#6


0  

  1. Go to Visual Studio "View" menu and click Properties Windows:
  2. 进入Visual Studio“View”菜单,点击“属性”窗口:

无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

  1. Select Target Framework x64 bit:
  2. 选择目标框架x64位:

无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

#7


0  

This is for Visual Studio 2010

这是Visual Studio 2010。

Go to your Project > Right Click and select Properties.

转到您的项目>右击并选择Properties。

Under Compile, go to Advanced Compile Options

在编译时,进入高级编译选项。

Locate Target CPU, then either

定位目标CPU,然后。

select x86 for 32bit systems, x64 for 64bit systems or Any CPU

选择x86用于32位系统,x64用于64位系统或任何CPU。

#1


50  

You have to mark the Setup project as a 64-bit installer. Your Setup project's TargetPlatform property in the Properties window, change it from x86 (the default) to x64.
Also make sure you deploy the 64-bit version of log4net and that your C# project's TargetPlatform setting is Any CPU.
And make sure that you actually need your app to run as a 64-bit process, that's rare.

您必须将安装项目标记为64位安装程序。在属性窗口中设置项目的TargetPlatform属性,将它从x86(默认)改为x64。还要确保部署64位版本的log4net,并且您的c#项目的TargetPlatform设置是任何CPU。确保你的应用程序需要运行为64位程序,这是很少见的。

#2


15  

  1. Open Deployment.vdproj, in Notepad.
  2. 打开部署。vdproj记事本。
  3. Find string "TargetPlatform" = "3:0"
  4. 查找字符串"TargetPlatform" = "3:0"
  5. Change to "TargetPlatform" = "3:1" for AMD64, or "TargetPlatform" = "3:2" for Itanium.
  6. 更改为AMD64的“TargetPlatform”= "3:1",或"TargetPlatform" = "3:2"的Itanium。
  7. Save Deployment.vdproj. In Visual Studio you don't see any changes, but your Project now AMD64.
  8. 拯救Deployment.vdproj。在Visual Studio中,您看不到任何更改,但是您的项目现在是AMD64。

#3


6  

  1. Open a deployment project.
  2. 打开部署项目。
  3. In the Solution Explorer, select the deployment project.
  4. 在解决方案资源管理器中,选择部署项目。
  5. In the Properties window, select the TargetPlatform property.
  6. 在属性窗口中,选择TargetPlatform属性。
  7. 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).
  8. 为一个Intel Itanium 64位平台选择Itanium,或者为其他64位平台选择x64(如AMD64和EM64T指令集)。
  9. At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.
  10. 在安装时,如果目标计算机与指定的平台不兼容,将会引发错误并停止安装。

#4


1  

  1. Open a deployment project.
  2. 打开部署项目。
  3. In the Solution Explorer, select the deployment project.
  4. 在解决方案资源管理器中,选择部署项目。
  5. In the Properties window, select the TargetPlatform property.
  6. 在属性窗口中,选择TargetPlatform属性。
  7. 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).
  8. 为一个Intel Itanium 64位平台选择Itanium,或者为其他64位平台选择x64(如AMD64和EM64T指令集)。

At installation time, an error will be raised and installation will be halted if the target computer is not compatible with the specified platform.

在安装时,如果目标计算机与指定的平台不兼容,将会引发错误并停止安装。

#5


0  

You may need an x64 Windows Service installed (think powershell) that needs to communicate to an x86 application. Your answer (properties/TargetPlatform) got me over that hurdle.

您可能需要安装一个x64 Windows服务(想想powershell),它需要与x86应用程序通信。你的答案(属性/目标平台)让我克服了这个障碍。

#6


0  

  1. Go to Visual Studio "View" menu and click Properties Windows:
  2. 进入Visual Studio“View”菜单,点击“属性”窗口:

无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

  1. Select Target Framework x64 bit:
  2. 选择目标框架x64位:

无法将vdproj与devenv - '目标'x64一起编译,这与项目的目标平台x86不兼容。

#7


0  

This is for Visual Studio 2010

这是Visual Studio 2010。

Go to your Project > Right Click and select Properties.

转到您的项目>右击并选择Properties。

Under Compile, go to Advanced Compile Options

在编译时,进入高级编译选项。

Locate Target CPU, then either

定位目标CPU,然后。

select x86 for 32bit systems, x64 for 64bit systems or Any CPU

选择x86用于32位系统,x64用于64位系统或任何CPU。