title: msbuild fails: MSB3086, MSB3091: "AL.exe", "resgen.exe" not found
body: <p>On a 64 bits Windows 7 machine, I installed .Net framework 4.5.1 and Windows SDK for Windows 8.1 from
  <a href="http://msdn.microsoft.com/en-us/windows/desktop/aa904949.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/windows/desktop/aa904949.aspx</a></p>
  
  <p>While attempting to build a solution, I get the following errors (that seem to be related):</p>
  
  <p>error MSB3086: 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</p>
  
  <p>error MSB3091: Task failed because "resgen.exe" was not found, or the correct Microsoft Windows SDK is not installed. The task is looking for "resgen.exe" in the "bin" subdirectory beneath the location specified in the InstallationFolder value of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v7.0A\WinSDK-NetFx35Tools-x86. You may be able to solve the problem by doing one of the following:  1) Install the Microsoft Windows SDK.  2) Install Visual Studio 2010.  3) Manually set the above registry key to the correct location.  4)Pass the correct location into the "ToolPath" parameter of the task.</p>
  
  <p>I tried the suggested solutions (except installing VS: not allowed on that machine), many others found on the Internet, such as reinstalling the SDK, perform some hacks in the registry, set environment variables, add tags in the project, attempt many command line switches to the msbuild process, and followed these threads:</p>
  
  <p><a href="https://stackoverflow.com/q/2731365/1288109">Running MSBuild fails to read SDKToolsPath</a></p>
  
  <p><a href="https://stackoverflow.com/q/1492155/1288109">Failing Build because it can&#39;t find AL.exe</a></p>
  
  <p><a href="https://stackoverflow.com/q/17288619">tfs 2012 build task failed because &quot;resgen&quot; was not found</a></p>
  
  <p>but none of them solved the problem.</p>
  
  <p>This question looks similar to:</p>
  
  <p><a href="https://stackoverflow.com/q/23655387/1288109">https://stackoverflow.com/q/23655387/1288109</a></p>
  
  <p>that has no answer!</p>
  
  <p>Any suggestion would be appreciated!</p>