Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

My app keeps getting this error (I'm using VS 2013, VB.NET, and Windows 8.1, by the way):

Could not run the "GenerateResource" task because MSBuild could not create or connect to a task host with runtime "CLR2" and architecture "x86". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "C:Program Files (x86)MSBuild12.0inMSBuildTaskHost.exe" exists and can be run.

The app is for .NET 3.5 (3.5 and lower versions get me this error). I try to run the app again. Sometimes, it works; sometimes, the error comes back.

I already tried looking up for answers at Google and the answer they gave me turned out to be: "Your build's username is too long" (they said that 20 characters or more cause the error), but it's not true. My user name is 5 characters only. Anyway, I don't think my build's username's length has anything to do with it; it makes no sense.

Does anyone know what is wrong with 3.5 and lower versions? Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
969 views
Welcome To Ask or Share your Answers For Others

1 Answer

This fixed the issue on my machine:

To resolve it, go to your csproj file and add the following line under the default property group:

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

Found here.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...