构建失败 - 无法找到Visual Studio 2017 [英] Build Failure - Unable to find Visual Studio 2017

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

问题描述

更新到TFS 2017 Update 2 RC1后,我的构建失败,因为找不到Visual Studio 2017(MSBuild 15.0)。我正在使用Visual Studio构建任务,并选择"最新"作为Visual Studio版本。

After updating to TFS 2017 Update 2 RC1, my builds are failing because Visual Studio 2017 (MSBuild 15.0) is not found. I am using the Visual Studio Build task with 'Latest' selected as the Visual Studio version.


  • 我重新安装了Visual Studio Build Tools 2017。
  • 我修复了我的TFS安装。
  • 我重新安装了我的构建代理。
  • 我已经验证我的Build代理具有Visual Studio 2017和MSBuild 15.0功能。

我能够成功构建的唯一方法是用'MSBuild'替换我的'Visual Studio Build'任务,并手动指向MSBuild可执行文件。我发现这不可接受,我有太多需要更改的Build配置。
当下一个版本的MSBuild问世时,我必须手动更新它们。

The only way I am able to get a successful build is to replace my 'Visual Studio Build' tasks with 'MSBuild', and manually direct to the MSBuild executable. I don't find this acceptable, I have too many Build configurations that would need to be changed. And when the next version of MSBuild comes out, I have to manually update them all.

构建代理功能:

推荐答案

安德鲁,

感谢您发布此处。

您能否在 Visual Studio版本
下拉列表?如果你能看到它,你可以尝试直接选择" Visual Studio 2017 "而不是"最新",然后检查它是否有效。

Can you see the version Visual Studio 2017 under Visual Studio Version dropdown list? If you can see it, you can try to select "Visual Studio 2017" directly instead of "Latest", then check if it works.

如果仍然无效,只需检查注册表:

If that still doesn’t work, just check the registry :

HKEY_LOCAL_MACHINE\SOFTWARE \WOW6432Node\Microsoft\VisualStudio \SxS \ VSS7 \15.0   

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7\15.0   

如果将值设置为其他目录,只需尝试将其编辑为指向BuildTools目录,然后尝试再次参考下面的截图。

If the value is set to the other directory, just try to edit that to point to the BuildTools directory, then try it again. Reference the screenshot below.

最诚挚的问候。


这篇关于构建失败 - 无法找到Visual Studio 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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