Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problems with new build server

After moving my build server I get the following error:

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.

My configuration says this:

<ConfigurationToBuild Include="Release|Any CPU">
    <FlavorToBuild>Release</FlavorToBuild>
    <PlatformToBuild>Any CPU</PlatformToBuild>
 </ConfigurationToBuild>

What am I missing?

like image 881
dexter Avatar asked Jan 21 '13 19:01

dexter


3 Answers

To resolve this, Go to your .csproj file and open with notepad.

Add the following line under the default property group:

<PropertyGroup>
      <DisableOutOfProcTaskHost>true</DisableOutOfProcTaskHost>
</PropertyGroup>

Project should compile now.

like image 59
Rahul Nikate Avatar answered Nov 15 '22 18:11

Rahul Nikate


In my case, I received that error message when trying to build a solution on a 32-bit Windows 7 machine. The way to resolve the error for me was to right-click on the project in VS, choose properties, then go to the Build tab. In here I changed the "Platform target" from "Any CPU" to "x86". HTH

like image 39
user8128167 Avatar answered Nov 15 '22 18:11

user8128167


Another approach is to do the following

Click Start ->> right-click Computer ->> Properties ->> Advanced system settings ->> click Environment Variables button to open the dialog,

then under the System variables section, click New… button, type the Variable name = DISABLEOUTOFPROCTASKHOST, and type the Variable value = 1,

then click Ok.

This should suppress this error.

like image 21
Prakash Somasundaram Avatar answered Nov 15 '22 18:11

Prakash Somasundaram