Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MSBuild on CI Server can't find AL.exe

I'm having a problem on my TeamCity CI build server where during compilation I get the following error:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2342, 9): error MSB3086: Task could not find "AL.exe" using the SdkToolsPath "" 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've found similar reports from a year ago when people were upgrading to .NET 3.5, for example this one. In that case, installing the latest SDK solved the issue, however I have already installed the latest SDK (Microsoft Windows SDK for Windows 7 and .NET Framework 4) on my build server. The MSBuild tools are all there on the server, in a folder called

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319

and AL.exe exists in

C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools

However the registry key mentioned in the error message does not exist. So, it seems like there is something wrong with the installation/configuration of MSBuild. This error only happens for projects that have embedded resources, which require AL.exe.

like image 326
Tim Long Avatar asked Jun 07 '10 00:06

Tim Long


People also ask

Where is Al EXE?

What is al.exe? Originally developed by Microsoft Corporation, al.exe is a legitimate file process and also known as Assembly Linker command line tool that is associated with Microsoft Visual Studio 2005. It is located in C:\Windows\Microsoft.NET\Framework\v2.

Is it is possible to build application if MSBuild is not installed?

Is it possible to build an application on a system if the MSBuild is not installed? If so, How? Yes, it is actually possible because the MSBuild doesn't depend on the Visual Studio of its operations.

Does MSBuild require Visual Studio?

Use of the Build Tools require a valid Visual Studio license. If you can use the Visual Studio Community for free, you can also use the Build Tools with a valid free license.


1 Answers

As you have install the latest SDK (I'm assuming that's v7.1)

  1. Go to "Microsoft Windows SDK v7.1" from the Start menu
  2. Select "Windows SDK 7.1 Command Prompt" and enter
  3. cd Setup

  4. WindowsSdkVer -version:v7.1

This will tell msbuild to use that version of the tools without needing to do any scary registry editing.

like image 71
AndyPook Avatar answered Sep 22 '22 04:09

AndyPook