Sometimes when you’re working with Visual Studio you got the “MSBuild on CI Server can’t find AL.exe” error during compilation. This post is implementing tested and solved method to fix your problem in 2 minutes.
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
Follow the below steps to fix your problem.
1- Make sure you have installed latest version of Microsoft Windows SDK.
2- Right click on My Computer and choose Properties, or Control Panel -> choose System.
3- Choose Advanced system settings.
4- On the Advanced tab, click on Environment Variables.
5- Click New to create a new environment variable under the User variable section.
6- Put the Variable name: TargetFrameworkSDKToolsDirectory
7- Variable value: TargetFrameworkSDKToolsDirectory=C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools
Variable value depends on your SDK installation path. So make sure to put your correct path. See the screens.
8- Save the all windows, Close the solution and restart the Visual Studio with Run as Administrator.
Hope your problem solved!