How to install build tools for v141_xp for VC 2017?

I'm using the newest release of MSVC 2017 community with platform toolset v141, but I'd like the executables still work on XP, so I assume I need to use the v141_xp toolset, which however results in:

Error MSB8020: The build tools for v141_xp (Platform Toolset = 'v141_xp') cannot be found. To build using the v141_xp build tools, please install v141_xp 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".

I didn't find anything like that in the MSVC installer. Any ideas?

Upvotes: 34

Views: 49184

Answers (3)

mpgn
mpgn

Reputation: 7251

On Visual Studio 2019 this option is deprecated but you can still select it :)

Here is a summary on how to install the toolset:

  • Bring up the Visual Studio installer (Tools -> Get Tools and Features)
  • Select Individual components
  • Select Windows XP support for C++ from the Summary section
  • Click Modify

enter image description here

Upvotes: 19

estebro
estebro

Reputation: 1027

I am not entirely clear on whether your issue is installing the C++ tools for Windows XP or modifying your project/solution to target that platform. Either way, the following link should help you out.

Here is a summary on how to install the toolset:

  • Bring up the Visual Studio installer (Tools -> Get Tools and Features)
  • Select Desktop development with C++
  • Select Windows XP support for C++ from the Summary section
  • Click Modify

enter image description here

enter image description here

Upvotes: 57

Oleksandr Dudnyk
Oleksandr Dudnyk

Reputation: 111

I had a similar problem and the reason for that was a not needed VCTargetsPath system variable. After removing it, VS 2017 now sees V141 toolset. I had VS 2017 Community first, maybe that made the problem.

Upvotes: 1

Related Questions