如何在 TFS Visual Studio 构建步骤中使用 Visual Studio 2017 [英] How to use Visual Studio 2017 with TFS Visual Studio Build Step

查看:46
本文介绍了如何在 TFS Visual Studio 构建步骤中使用 Visual Studio 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行 TFS 2015 并使用 Visual Studio 构建步骤.在开发机器上,我转而使用 Visual Studio 2017,因此我也想使用 Visual Studio 2017 进行 TFS 构建.

I am running TFS 2015 and are using the Visual Studio Build Step. On the developemnt machines I moved to use Visual Studio 2017 so I also want to use Visual Studio 2017 for the TFS builds.

我在构建服务器上安装了 Visual Studio 2017 并重新启动了构建代理.但是,Visual Studio 2017 没有显示在代理的功能中,也没有显示在构建步骤的 Visual Studio 版本列表中.

I installed Visual Studio 2017 on the build server and restarted the build agent. However Visual Studio 2017 does not show up in the capabilities of the agent and it also does not show in the list of Visual Studio versions in the build step.

我知道我可以在构建步骤中从 Visual Studio 版本列表中选择最新",但这仍然会使用 VS 2015,因为代理不知道它有 VS 2017.

I know I can choose "latest" from the list of Visual Studio version in the build step, but this will still use VS 2015 as the agent does not know that it has VS 2017.

如何确保 TFS2015 中的 Visual Studio Build Step 使用 Visual Studio 2017?

How can I make sure that the Visual Studio Build Step in TFS2015 uses Visual Studio 2017?

推荐答案

您可以使用 MSBuild 任务代替 Visual Studio Build Step,然后指定 MSBuild 15.0 的位置:

You can use MSBuild task instead of Visual Studio Build Step, then specify the location of MSBuild 15.0:

这篇关于如何在 TFS Visual Studio 构建步骤中使用 Visual Studio 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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