Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install (v142) Build tools in Visual studio

As I am trying to build something in visual studio then visual studio show me some warning and then If i ignored it and build then error occurs.

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

It will also show me an Alternate option I also tried it but not works.

    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". 
like image 759
Vardaan Shukla Avatar asked Jul 05 '19 10:07

Vardaan Shukla


People also ask

How do I change the build tool in Visual Studio?

To change the platform toolset In Visual Studio, on the menu bar, select Project > Properties to open your project Property Pages dialog box. In the top of the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

How do I retarget a solution in Visual Studio?

Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution". To resolve these errors, right-click on the solution node in Solution Explorer and click Retarget solution.


1 Answers

I had the same problem, but when trying to open a project made in VS2019 with VS2017, so I changed this in my project:

Go to: Project->Properties->General->Platform Toolset and change to the current version of your VS.

like image 90
Anda Avatar answered Oct 16 '22 16:10

Anda