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".
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With