のねのBlog

パソコンの問題や、ソフトウェアの開発で起きた問題など書いていきます。よろしくお願いします^^。

VS2015でVS2013をステップ実行したとき、MSB8003

MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.


Microsoft.CppBuild.targetsのファイルの中

<!-- Warn the user that about the missing envoriment variable -->
    <VCMessage Code="MSB8003" Type="Warning" Arguments="VCInstallDir"  
                                          Condition="'$(VCInstallDir)'=='' and '$(UseEnv)' != 'true'" />

    <VCMessage Code="MSB8003" Type="Warning" Arguments="WindowsSDKDir"  
                                          Condition="'$(WindowsSDKDir)'=='' and '$(UseEnv)' != 'true'" />

$(VSInstallDir)
Visual Studio 2010 をインストールしたディレクトリです。

このプロパティにはインストールされた Visual Studio のバージョンが含まれますが、
ホストの Visual Studio のバージョンとは異なることがあります。
たとえば、$(PlatformToolset) = v90 を設定してビルドした場合、
$(VSInstallDir) には Visual Studio 2008 インストール ファイルへのパスが含まれます。