The build tools for v143 (Platform Toolset = 'v143') cannot be found

Kaustubh Dwivedi 0 Reputation points
2024-05-21T10:13:00.3333333+00:00

I am upgrading my application build environment from Visual Studio 2019 to Visual Studio 2022. I have installed and setup the Visual Studio 2022 Professional

User's image

User's image

As VS2019 uses Platform toolset v142 while VS2022 uses platform toolset v143, I will have to change platform toolset of all the projects (around 400 projects) in my application. So instead, I am using Directory.build.targets (placed in the root directory) file to overwrite the platform toolset in all my project files

<?xml version="1.0" encoding="utf-8"?>
<Project>
  <PropertyGroup Label="Globals">
    <PlatformToolset>v143</PlatformToolset>
  </PropertyGroup>
</Project>

But when building projects I am facing this issue. I am sure I have installed all the v143 build related tools from Visual Studio Installer (shown in above images).

error MSB8020: The build tools for v143 (Platform Toolset = 'v143') cannot be found. To build using the v143 build tools, please install v143 build tools.

When I am removing the Directory.build.targets file and manually changing the project file from <PlatformToolset>v142</PlatformToolset> to <PlatformToolset>v143</PlatformToolset> its working fine.

What can be the issue ??

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,500 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,194 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,004 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.