CppPilot

MSVC build errors > MSB8020

MSB8020: build tools cannot be found

error MSB8020: The build tools for v142 (Platform Toolset = 'v142') cannot be found.

The project asks for a version of the MSVC compiler, its platform toolset, that is not installed in this Visual Studio.

Causes and fixes

  1. The project comes from an older Visual Studio. Right-click the solution and choose Retarget solution, or set General > Platform Toolset to the installed toolset, such as v143.
  2. The project must keep its toolset. Install it from the Visual Studio Installer: Individual components, MSVC build tools of that version.
  3. A build server lacks the toolset. Install the same Build Tools components on the server, or pass /p:PlatformToolset=v143 to MSBuild.

Fix MSB8020 with CppPilot

CppPilot reads the error, your code, and the project settings Visual Studio evaluates for the active configuration, then explains which of these causes applies. Choose Fix and the AI corrects it; CppPilot rebuilds the project and checks that the error is gone. Every change appears in Visual Studio for your approval.

Let the AI fix it in Visual Studio

CppPilot is a free extension that explains and fixes MSVC build errors with Codex, Claude, or CppPilot Cloud.

Get CppPilot free Get started

Related errors: MSB8036, C1083. See all guides.