我最近開始使用Visual Studio 2010.我有以下問題:我的項目不會生成。我得到這個錯誤:無法設置msbuild.exe的路徑Visual Studio 2010
C:\...\visual studio 2010\Projects\String2\String2\String2.vcxproj : error MSB4014: The build stopped unexpectedly because of an internal failure.
C:\...\visual studio 2010\Projects\String2\String2\String2.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.
我檢查有問題的目錄,MSbuild.exe的確可以在那裏找到。環境變量MSBUILD_EXE_PATH中的路徑設置爲正確的路徑。仍然該項目不會建立。有時候我可以改變環境變量在最後包含「/msbuild.exe」,這樣就行了。有時它不會。每次重新啓動計算機時都會返回問題。