のねのBlog

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

VS2015でVS2013のコードをデバッグしようとしたときのエラー

VS2013を入れないと、デバッグできないのかな?

error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found.
To build using the v120 build tools, please install v120 build tools.
Alternatively, you may upgrade to the current Visual Studio tools 
by selecting the Project menu or right-click the solution,
 and then selecting "Retarget solution".

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 インストール ファイルへのパスが含まれます。