Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2019 - error MSB8020: The build tools for Visual Studio 2013 cannot be found

This is the GitHub page where I'm trying to use msbuild.exe only it's throwing this following error:

1>------ Build started: Project: keycastow, Configuration: Debug|Win32 ------
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(379,5): error MSB8020: The build tools for Visual Studio 2013 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install Visual Studio 2013 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".
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Is there 2 possible options to get this on GitHub to work?

NOTE: I would prefer option number one.

  1. To update the current code to 2019 standards (would that be difficult for a beginner)?
  2. Get the current v120 build tools to work.
    • Am I missing dependencies for it to work? My current installs View
    • I've checked this thread here and downloaded Microsoft Build Tools 2013 and installed but I'm having the same problem. Seeing as I'm using 2019, I thought it best to open up a new thread.

Additional info

  • Here's a screenshot of what I've currently installed in Visual Studio 2019. View.

  • There are no options in the current version to install Microsoft Build Tools 2013 in the app itself so the installed standalone version doesn't appear here as an option.

like image 511
Ste Avatar asked Jun 23 '19 16:06

Ste


1 Answers

Open the keycastow.vcxproj with notepad, change here the <PlatformToolset>v120</PlatformToolset> to <PlatformToolset>v142</PlatformToolset> to use the VC++ 2019 platform or change the version via UI

In Visual Studio, in Solution Explorer, open the shortcut menu for your project (not for your solution) and then choose Properties to open your project Property Pages dialog box.

  1. In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.

  2. In the left pane of the dialog box, expand Configuration Properties and then select General.

  3. In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list (2019 - v142 in your case)

  4. Choose the OK button.

Now you compile the project without installing anything.

like image 115
magicandre1981 Avatar answered Oct 02 '22 10:10

magicandre1981