使用visual studio 2010 express编译任何C ++项目时,我可能会遇到以下行为 - 生成启动消息出现在输出窗口中,CPU爬升到接近100%,生成多个MSBuild.exe进程,长时间暂停(几分钟) )没有任何事情发生,使用以下消息构建中止
xxx.vcxproj : error MSB4014: The build stopped unexpectedly because of an internal failure.
xxx.vcxproj : error MSB4014: Microsoft.Build.Exceptions.BuildAbortedException: Build was canceled. MSBuild.exe could not be launched as a child node as it could not be found at the location "c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe". If necessary, specify the correct location in the BuildParameters, or with the MSBUILD_EXE_PATH environment variable.
xxx.vcxproj : error MSB4014: at Microsoft.Build.BackEnd.NodeManager.AttemptCreateNode(INodeProvider nodeProvider, NodeConfiguration nodeConfiguration)
xxx.vcxproj : error MSB4014: at Microsoft.Build.BackEnd.NodeManager.CreateNode(NodeConfiguration configuration, NodeAffinity nodeAffinity)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.PerformSchedulingActions(IEnumerable`1 responses)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker)
xxx.vcxproj : error MSB4014: at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler(BuildSubmission submission, Boolean allowMainThreadBuild, BuildRequestBlocker blocker)
当您的用户名为20个字符时,Microsoft已承认此行为存在错误,但我的错误要短得多。不用说我确实在正确的位置安装了msbuild.exe。
我发现的唯一工作是在构建过程中将任务切换到另一个应用程序。但我希望有人有更好的解决方法。
MTIA 约翰
答案 0 :(得分:4)
您已经淘汰了KB2298853。确保安装SP1。这不是唯一的原因,即使在解决方法之后,其他一些用户也会遇到此问题。基本故障似乎是创建一个允许msbuild与IDE通信的管道的问题。这就是为什么从命令行运行msbuild时它不会失败的原因。
这是一个尚未确诊的环境问题。您需要在计算机上查找执行环境异常的原因。通过有选择地禁用或终止进程来实现。从您的恶意软件开始。此外,启动另一个Visual Studio实例并使用Tools + Attach to Process将非托管调试器附加到第一个实例和/或msbuild。 Debug + Break All并使用Debug + Windows + Modules查找可能在Microsoft未创建的进程中注入的DLL。注意Path列。不确定Express Edition btw上是否提供Attach to Process。
答案 1 :(得分:2)
实际上它只是avast中的行为屏障导致了visual studio的问题。 如果你在尝试构建时关闭它,它将构建并运行。现在我们只需要微软或avast来创建一个更新,这将消除这个问题。刚刚发现这10分钟前。在2011年12月3日下午2:50威斯康星州的中央标准时间
答案 2 :(得分:1)
我可以通过关闭Avast的行为保护来确认这个问题也解决了。事情肯定是不对的。无尽的MSBuild.exe
(和conime.exe
)进程和devenv.exe
最大化CPU。似乎是Avast的真正系统杀手。 : - (
答案 3 :(得分:0)
在我的情况下,只需重新启动VS2010就可以帮助修复错误。遇到此错误的任何人都可能想先尝试一下。
(我正在使用VS 2010 SP1)