11

This is similar to other questions where MS build tools could not be found but in my case I have already installed the build tools and I am using the correct version of VS for the specified tools (VS2022) on Windows 10.

The error message "The build tools for v143 cannot be found" is occurring when I try to build a C++ project in VS2022 that was originally developed using VS2010 but was upgraded to use the v143 build tools.

I have the following installed:

VS Installer - Components (Compilers, Build Tools And Runtimes)

VS Installer - Components (Development Activities)

Can anyone explain why this is happening and provide a solution?

YungDeiza
  • 3,128
  • 1
  • 7
  • 32
  • Do you know if it needs a _specific_ toolset version? https://stackoverflow.com/questions/67488078/make-visual-studio-use-different-minor-version-toolset – Timothy G. Jun 10 '22 at 12:35
  • I've got the latest version available and latest VS update – YungDeiza Jun 10 '22 at 13:04

3 Answers3

6

I suggest you refer to this issue:

I suggest you install VS2022 to use v143 build tools. Or you can right-click on your project > Properties > General > Platform Toolset and select the corresponding version for your VS.

Similarly, this FeedBack also has reference value.

Yujian Yao - MSFT
  • 945
  • 1
  • 3
  • 9
  • The correct version of the build tools are installed for the correct version of VS – YungDeiza Jun 13 '22 at 06:11
  • 1
    @YungDeiza >you can right-click on your project > Properties > General > Platform Toolset and select the corresponding version for your VS. Please try this setting. – Yujian Yao - MSFT Jun 13 '22 at 09:04
  • Yes. This worked for me. I had both VS2019 and VS 2022 installed. I got the error when compiling with VS2019. Then I tried vs2022 and it worked. – qqqqq Jan 07 '23 at 06:36
  • I'm using VS 2022, got the issue: Error MSB8020 The build tools for v143 (Platform Toolset = 'v143') cannot be found. Installed https://learn.microsoft.com/en-us/answers/questions/769911/visual-studio-2019-build-tools-v143 but the issue still there. Any thoughts ? – Bohdan Feb 20 '23 at 17:46
-1

check that VCTargetsPath points to c:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\

  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/33557700) – pigrammer Jan 05 '23 at 02:01
-1

I faced similar issue. I had VCTargetsPath set in my environment Variable. On deleting this variable, project build successfully