2

There is a lot of answers related to upgrading a solution from Visual Studio 2017 to Visual Studio 2019 on StackOverflow. But how do I downgrade back to Visual Studio 2017? When I try to build a project in Visual Studio 2017 I get the following error:

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.  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".

Before that, I used Visual Studio 2019 with the solution and it worked fine. But now I have to use Visual Studio 2017 instead and as expected I have errors. Is there a way to fix it not recreating the solution manually? Thanks for advice!

voilalex
  • 2,041
  • 2
  • 13
  • 18
  • You may be able to edit the solution/project file in a text editor (like VS) and change the things that indicate it wants newer things. May need to create a project in 2017 and compare things. Not sure how much the structures changed between them since there was a lot of simplifications at least on the .NET side of things so it may be simple or not. – Sami Kuhmonen Nov 19 '19 at 06:01
  • install [2019 Build tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) or change v142 to v141 in the csproj – magicandre1981 Nov 19 '19 at 14:54

1 Answers1

4

This problem is with your MSBuilder, re check the version of MSBulder in Visual Studion sometime it may be still support for vs2019.

or

You can changed this in your project to: Project->Properties->General->Platform Tool_set and change to the current version of your VS.

Think this will be helpful.!