15
votes

The project worked fine in Visual Studio 2010, and we upgraded to 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". 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

Does anyone how to solve this issue?

I am on Windows 2008 R2 SP1 with .NET 4.5 installed. I did not install .NET 4 directly, I used the .NET 4.5 installer.

5
Have you followed the steps described in the error message?Daniel Hilgarth
@DanielHilgarth I don't have .net. I installed direct .net 4.5 when I install my station 2-3 days ago.user1460904
Obviously your project uses the Windows SDK for .NET 4. Did you install that?Daniel Hilgarth
@DanielHilgarth I have .net 4.5 do I have any other option for make it work.user1460904
Install the SDK. What's so hard to understand here?Daniel Hilgarth

5 Answers

13
votes

I fixed this by installing "Windows Software Development Kit (SDK) for Windows 8" from http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx

I was confused by the title - I'm on Windows 7 - but it worked.

4
votes

Solution pointed by Mark Rainey worked for us: http://www.markrainey.me/2013/02/setting-up-build-machine.html

Changing sdk version

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
1
votes

My issue was when clicking on Properties on the solution for the Active(Debug) configuration, the configuration for my projects were set to Release. Changed it to Debug, rebuilt and the build error disappeared.

1
votes

After 2013 now msbuild is part of VS.

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

C:\Program Files (x86)\MSBuild\14.0\Bin\

0
votes

"I fixed this by installing "Windows Software Development Kit (SDK) for Windows 8" from http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx"

This solution by user489998 worked fine on Windows server 2008 R2 as well.