新构建服务器的问题

dex*_*ter 11 64-bit configuration-files visual-studio msbuild-4.0 tfs2012

移动我的构建服务器后,我收到以下错误:

C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets (1682): Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR2" and architecture "x64". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "MSBuildTaskHost.exe" exists and can be run.

我的配置说:

<ConfigurationToBuild Include="Release|Any CPU">
    <FlavorToBuild>Release</FlavorToBuild>
    <PlatformToBuild>Any CPU</PlatformToBuild>
 </ConfigurationToBuild>
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

Rah*_*ate 12

要解决此问题,请转到您的,.csproj file并使用记事本打开.

在默认属性组下添加以下行:

<PropertyGroup>
      <DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
</PropertyGroup>
Run Code Online (Sandbox Code Playgroud)

项目现在应该编译.

  • 请参阅https://connect.microsoft.com/VisualStudio/feedback/details/758772/generateresource-fails-for-net-3-5-application-when-net-4-5-has-been-安装更长时间讨论它.基本上,它是.NET 3.5.1的已知问题的解决方法.感谢Rahul Nikate提供了这样一个确切的例子.这为我修好了! (2认同)

use*_*167 8

就我而言,我在尝试在32位Windows 7计算机上构建解决方案时收到了该错误消息.为我解决错误的方法是右键单击VS中的项目,选择属性,然后转到Build选项卡.在这里,我将"平台目标"从"任何CPU"更改为"x86".HTH