Click here to Skip to main content
15,399,959 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am trying to bbuild c++ projectin visual studio 2017, but i am getting below error

Severity Code Description Project File Line Suppression State
Error MSB8020 The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 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". csiNotificationProvider C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\Microsoft.Cpp.Platform.targets 57

What I have tried:

i have already installed specific c++ library.

and also tried below but no luck

I applied these commands in succession

npm install -g node-gyp

npm install --global --production windows-build-tools
Posted
Updated 20-Jan-22 11:50am
Comments
Richard MacCutchan 19-Jan-22 11:11am
   
That toolset is part of Visual Studio and (as far as I know) is not installed via npm. You should do what the error message suggests and re-target to toolset 140.
Rick York 19-Jan-22 11:54am
   
You can install toolsets with the Visual Studio Installer. Click the Modify tab and then select all toolsets and SDKs you want to install. It's a fairly simple procedure.

1 solution

The easiest way would be to change the Platform Toolset to an installed version in the project properties. Best for release and build and all bit widths.

If the installed toolsets do not work, the installation may need to be repaired.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900