title: Visual Studio 2019: How to use Platform Toolset v140_xp?
body: <p>I am trying to compile an application for Windows XP using Visual Studio 2019. For that I tried to use platform toolset v140_xp. It does not work, the following error message appears:</p>
  
  <pre><code>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v140_xp\Toolset.targets(36,5): warning MSB8003: Could not find WindowsSdkDir_71A variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may be set to an invalid version number.
  </code></pre>
  
  <p>Clearly, the tools are looking for the Windows SDK v7.1A. Downloading the Windows 7 SDK from Microsoft does not work. Even if you manage to install it, the SDK has version 7.1 (without the A) and not 7.1A. So the error remains.</p>
  
  <p>I have found out that the Windows SDK v7.1A used to be included with Visual Studio 2015, but I cannot find it anywhere in the Visual Studio 2019 installer.</p>
  
  <p>How do I use the v140_xp toolset?</p>
  
  <p>Steps to reproduce the problem:</p>
  
  <ul>
  <li>install Visual Studio 2019 with desktop c++ development</li>
  <li>select "MSVC v140 - VS2015 C++ Build tools" in the visual studio 2019 installer</li>
  <li>create a C++ console application project</li>
  <li>edit the project settings</li>
  <li>select the v140_xp platform toolset</li>
  <li>try to build the project</li>
  </ul>