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

心不动则不痛 提交于 2021-02-10 03:12:56

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/56725747/visual-studio-2019-error-msb8020-the-build-tools-for-visual-studio-2013-canno

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!