16

I have this problem tring to build one solution

Task could not find "AL.exe" using the SdkToolsPath "C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\" or the registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A". 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

I know there is a similar question, but the aswer didn't work for me

In the same computer a can build other solutions in Net 4 without any problem, so don't understand

I'm using: Windows XP Professional SP3 Visual Web Developer 2010 Express

SebRojas
  • 198
  • 1
  • 3
  • 10
  • Odds are pretty good that this is not included with the Express edition, it certainly isn't an Express kind of tool. You'll need to install the full version of the SDK. – Hans Passant Feb 07 '11 at 16:06
  • I installed Microsoft Windows SDK 7.1...but didn't work – SebRojas Feb 07 '11 at 16:12

4 Answers4

17

Easiest thing to do is copy al.exe
from
C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\NETFX 4.0 Tools\
(For Windows 10 from
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools)

to
C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\

Michael Freidgeim
  • 26,542
  • 16
  • 152
  • 170
Noah
  • 15,080
  • 13
  • 104
  • 148
  • Can you suggest target location for Windows server 2012 – Shalem Apr 15 '19 at 11:56
  • 1
    It's probably healtier to install target framework version tools via visual studio installer. Creating a folder with different version can cause other issues in the future. – Mehmet Karadeniz Mar 29 '21 at 07:29
10

As I got this issue in VS2019 after a fresh install of both Windows and Visual Studio 2019 I thought it might be good to share:

Installing Microsoft.Net.Component.4.7.2.SDK from the Visual Studio installer fixed it for me!

Bas Slagter
  • 9,831
  • 7
  • 47
  • 78
  • 2
    This advice helped, except I installed 4.6.1 and 4.7.2 in addition to 4.8 which was there. That's because I have VS solutions with projects targeting all of these versions. – Bent Tranberg Oct 28 '19 at 08:21
  • 1
    Thank you. You saved my day. I had this issue with Xamarin Forms project. – FetFrumos Nov 26 '19 at 15:24
3

Do you have any resource files in your project? Try to delete all of them and build your project again. I've got exact the same error and after deleting the resource files (*.hrsx) my build worked again.

Maybe it helps.

Mariusz
  • 1,409
  • 12
  • 25
1

I am using VS2019, this way works for me:

Add a system env variable TargetFrameworkSDKToolsDirectory

like this:
TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools

Corey
  • 1,217
  • 3
  • 22
  • 39