Running MSBuild fails to read SDKToolsPath
daisukenishino2 opened this issue · comments
Phenomenon
The following build error has occurred at the environment that "Visual Studio 2015 community edition" was installed.
"C:\root\programs\C#\Frameworks\Infrastructure\AllComponent.sln" (既定のターゲット) (1) ->
"C:\root\programs\C#\Frameworks\Infrastructure\Business\Business.csproj" (既定のターゲット) (2) ->
"C:\root\programs\C#\Frameworks\Infrastructure\Framework\Framework.csproj" (既定のターゲット) (4) ->
"C:\root\programs\C#\Frameworks\Infrastructure\Public\Public.csproj" (既定のターゲット) (5) ->
(GenerateSatelliteAssemblies ターゲット) ->
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2863,5): error MSB3086: タスクは SdkToolsPath "" またはレジストリ キー "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.0A\WinSDK-NetFx40Tools-x86" を使用して "AL.exe"を見つけられませんでした。SdkToolsPath が設定されていること、SdkToolsPath の下の適切なプロセッサ固有の場所にツールが存在すること、および Microsoft Windows SDK がインストールされていることを確認してください。 [C:\root\programs\C#\Frameworks\Infrastructure\Public\Public.csproj]
"AL.exe" seem to be required in order to create a satellite assembly. However,
"MSbuild.exe" did not seem to be able to search the "AL.exe".
It should be noted, it can be built without any problems in "devenv.exe".
Therefore "devenv.exe" can search the "AL.exe".
See
- チュートリアル: 複数のコンピューターを使用するビルド環境の作成
https://msdn.microsoft.com/ja-jp/library/jj850211.aspx - Overview of the Windows SDK
https://msdn.microsoft.com/en-us/library/ms717422.aspx - Targeting .NET Platforms
http://getdotnet.azurewebsites.net/target-dotnet-platforms.html - .net - Running MSBuild fails to read SDKToolsPath - Stack Overflow
http://stackoverflow.com/questions/2731365/running-msbuild-fails-to-read-sdktoolspath - Task could not find "AL.exe" でエラーが出た時の対応 - dunno logs
http://d.hatena.ne.jp/dany1468/20120403/1333412152
Correspondence
By the minimum set creation, it was identified that this problem occurs when the following nuget package exists. This phenomenon can be confirmed on VisualStudio 2015 professional.
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="DotNetZip" version="1.9.1.8" targetFramework="net46" />
<package id="log4net" version="2.0.5" targetFramework="net46" />
<package id="Newtonsoft.Json" version="6.0.5" targetFramework="net46" />
</packages>
Installation of the Windows SDK for Windows 8 seems necessary.
Run the installer after downloading from the following website.
Then, turn on the check box of the following installation items.
- Windows 8 用 Windows ソフトウェア開発キット (Windows SDK)
https://developer.microsoft.com/ja-jp/windows/downloads/windows-8-sdk- Windows Software Development Kit
- .NET Framework 4.5 Software Development Kit
Additional information
This information was published from Visual Studio Support Team in Japan.
- Visual Studio サポート チーム blog
Nuget で入手したライブラリを使用するプロジェクトのビルド時にMSB3086 のエラーが発生
https://blogs.msdn.microsoft.com/jpvsblog/2016/09/12/nuget-msb3086/
Correctly,
[.NET Framework 4.5 Software Development Kit] is only required.
[Windows Software Development Kit] is no required.