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 ??

Developer technologies | Visual Studio | Debugging
Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.


Your answer

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