[英]Compilation issue in Visual Studio 12 Professional with a C# project
The project worked fine in Visual Studio 2010, and we upgraded to Visual Studio 2012; 该项目在Visual Studio 2010中运行良好,我们升级到Visual Studio 2012; however, now it does not compile.
但是,现在它没有编译。
We get the following error: 我们收到以下错误:
Error 2 Task could not find "AL.exe" using the SdkToolsPath "" or the registry key "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v8.0A\\WinSDK-NetFx40Tools-x86".
错误2任务无法使用SdkToolsPath“”或注册表项“HKEY_LOCAL_MACHINE \\ SOFTWARE \\ Microsoft \\ Microsoft SDKs \\ Windows \\ v8.0A \\ WinSDK-NetFx40Tools-x86”找到“AL.exe”。 Make sure the SdkToolsPath is set and the tool exists in the correct processor specific location under the SdkToolsPath and that the Microsoft Windows SDK is installed PROJECT_NAME
确保已设置SdkToolsPath,并且该工具位于SdkToolsPath下正确的处理器特定位置,并且安装了Microsoft Windows SDK PROJECT_NAME
Does anyone how to solve this issue? 有人怎么解决这个问题?
I am on Windows 2008 R2 SP1 with .NET 4.5 installed. 我在安装了.NET 4.5的Windows 2008 R2 SP1上。 I did not install .NET 4 directly, I used the .NET 4.5 installer.
我没有直接安装.NET 4,我使用的是.NET 4.5安装程序。
I fixed this by installing "Windows Software Development Kit (SDK) for Windows 8" from http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx 我通过从http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx安装“适用于Windows 8的Windows软件开发工具包(SDK)”来解决此问题。
I was confused by the title - I'm on Windows 7 - but it worked. 我对标题感到困惑 - 我在Windows 7上 - 但它确实有效。
Solution pointed by Mark Rainey worked for us: http://www.markrainey.me/2013/02/setting-up-build-machine.html Mark Rainey指出的解决方案为我们工作: http : //www.markrainey.me/2013/02/setting-up-build-machine.html
Changing sdk version
改变sdk版本
Go to "Microsoft Windows SDK v7.1" from the Start menu Select "Windows SDK 7.1 Command Prompt" and enter > cd Setup > WindowsSdkVer -version:v7.1
My issue was when clicking on Properties
on the solution for the Active(Debug)
configuration, the configuration for my projects were set to Release
. 我的问题是当单击
Active(Debug)
配置解决方案上的Properties
时,我的项目配置被设置为Release
。 Changed it to Debug
, rebuilt and the build error disappeared. 将其更改为
Debug
,重建并且构建错误消失。
After 2013 now msbuild is part of VS. 2013年之后,msbuild成为VS的一部分。
https://blogs.msdn.microsoft.com/visualstudio/2013/07/24/msbuild-is-now-part-of-visual-studio/ https://blogs.msdn.microsoft.com/visualstudio/2013/07/24/msbuild-is-now-part-of-visual-studio/
On my case I had to change the msbuild path after I installed VS2015 to 在我的情况下,我必须在安装VS2015之后更改msbuild路径
C:\\Program Files (x86)\\MSBuild\\14.0\\Bin\\ C:\\ Program Files(x86)\\ MSBuild \\ 14.0 \\ Bin \\
"I fixed this by installing "Windows Software Development Kit (SDK) for Windows 8" from http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx " “我通过从http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx安装”适用于Windows 8的Windows软件开发工具包(SDK)“来修复此问题。”
This solution by user489998 worked fine on Windows server 2008 R2 as well. user489998的这个解决方案在Windows Server 2008 R2上运行良好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.