Visual Studio 2019 - 错误 MSB8020:找不到 Visual Studio 2013 的构建工具 [英] Visual Studio 2019 - error MSB8020: The build tools for Visual Studio 2013 cannot be found

查看:646
本文介绍了Visual Studio 2019 - 错误 MSB8020:找不到 Visual Studio 2013 的构建工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我尝试使用 msbuild.exeGitHub 的页面/code> 只是它抛出以下错误:

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 ==========

<小时>

是否有 2 种可能的选项可以让 GitHub 上的这个 工作?


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

注意:我更喜欢第一个选项.

  1. 将当前代码更新为 2019 年标准(这对初学者来说会不会很困难)?
  2. 让当前的 v120 构建工具发挥作用.
    • 我是否缺少使其工作所需的依赖项?我当前的安装查看
    • 我在线程这里检查并下载Microsoft Build Tools 2013 并安装但我有同样的问题.看到我在用 2019,我觉得最好开个新帖.
  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.

<小时>

其他信息

  • 这是我当前在 Visual Studio 2019 中安装的屏幕截图.查看.

当前版本中没有安装选项 Microsoft Build Tools 2013 在应用程序本身中,因此已安装的独立版本不会作为选项出现在此处.

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.

推荐答案

用记事本打开keycastow.vcxproj,这里修改v120v142​​ 以使用 VC++ 2019 平台或 通过 UI 更改版本

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

在 Visual Studio 的解决方案资源管理器中,打开快捷菜单您的项目(不适用于您的解决方案),然后选择 Properties 以打开您的项目属性页对话框.

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. 在属性页"对话框中,打开配置"下拉列表,然后选择所有配置".

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

在对话框的左窗格中,展开配置属性,然后选择常规.

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

在右侧窗格中,选择平台工具集,然后从下拉列表中选择所需的工具集(在您的情况下为 2019 - v142)

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

选择确定按钮.

现在您无需安装任何东西即可编译项目.

Now you compile the project without installing anything.

这篇关于Visual Studio 2019 - 错误 MSB8020:找不到 Visual Studio 2013 的构建工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆