" GenerateResource"任务CLR2运行时错误 [英] "GenerateResource" task CLR2 runtime error

查看:2600
本文介绍了" GenerateResource"任务CLR2运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序不断收到这个错误(我使用VS 2013,VB.NET,和Windows 8.1,顺便说一句):

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

无法运行GenerateResource的任务,因为MSBuild的无法创建或运行时CLR2和建筑中的x86连接到任务的主机。请确保(1)请求的运行时和/或体系结构可在机器上,和(2),所需的可执行文件C:\ Program Files文件(x86)的\的MSBuild \ 12.0 \ BIN \ MSBuildTaskHost.exe的存在,并能运行

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)\MSBuild\12.0\bin\MSBuildTaskHost.exe" exists and can be run.

该应用程序是.NET 3.5(3.5和更低的版本让我这个错误)。 我尝试再次运行应用程序。有时,它的工作原理;有时,错误回来。

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.

我已经尝试过找了答案,在谷歌,他们给了我竟然回答:你构建的用户名是太长(他们说,20个或更多字符会导致错误),但事实并非如此。我的用户名是只有5个字符。无论如何,我不认为我的体型的用户名的长度有什么关系呢;它没有任何意义。

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.

有谁知道什么是错的3.5和更低的版本?谢谢你。

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

推荐答案

这固定的问题我的机器上:

This fixed the issue on my machine:

要解决它,去到你的csproj文件和缺省属性组下添加以下行:

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

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

这里。

这篇关于&QUOT; GenerateResource&QUOT;任务CLR2运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆