Error MSB8020 The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found, but v100 not used

Shane 46 Reputation points
2022-04-19T17:00:44.623+00:00

I get the following error when I try to build my Visual Studio C++ project:

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 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". [C:\path\to\src\li.vcxproj]

However, I only have v140 in my project:

$ grep -hrIi platformtoolset .
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
    <PlatformToolset>v140</PlatformToolset>
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1
#TargetFrameworkVersion=v4.0:PlatformToolSet=v140_xp:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native64Bit:WindowsTargetPlatformVersion=

I tried retargeting the solution as suggested in the error message, but I didn't see any option for v140 in the dropdown (see screenshot: https://i.stack.imgur.com/7yxaA.png).

I cannot upgrade to v141, because my team's CI builds run on Visual Studio 2015, and I believe Visual Studio 2015 does not have v141.

Why could I be getting this error, and how can I fix it?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,519 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,882 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 25,466 Reputation points Microsoft Vendor
    2022-04-20T03:12:19.463+00:00

    Hi @Shane ,

    Welcome to Microsoft Q&A!

    Which version of Visual Studio are you using?

    The v100 build tools is installed with VS2010. From your error message, you need to install the VS2010 or upgrade your project to use a newer version of platform toolset.

    For VS2010, it has ended for support. You may have issues later if you install VS2010.

    If you are using VS2017, you can try to install the “VC++ 2015.3 v14.00 (v140) toolset for desktop” component through running Visual Studio Installer > Modify > Individual components.
    And check if the v140 exists in the Platform Toolset or not.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Shane 46 Reputation points
    2022-04-20T18:01:27.487+00:00

    It turns out the problem was that I only made the settings changes for one of the projects in the solution, and I failed to make the settings changes to the entire solution. The platform toolset error message was just a red herring.

    0 comments No comments