如何从命令行获取Visual Studio解决方案的最新信息? [英] How do I get latest from a Visual Studio solution from the command line?

查看:202
本文介绍了如何从命令行获取Visual Studio解决方案的最新信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Visual Studio的解决方案资源管理器上下文菜单中递归地获取我的解决方案的最新版本?我想从命令行或通过宏来做到这一点。我试图通过使用一组批处理文件自动化我的日常生活的一部分。我相信很多开发人员会喜欢这样的东西。

How do I get the latest version of my solution recursively like its done in the solution explorer context menu of Visual Studio? I want to do this from the command line or via a macro. I'm trying to automate a part of my daily routine by using a set of batch files. I am sure a lot of developers would love to have something like this.

tf get 文件夹(不是解决方案)。它不看项目依赖等等。这将不起作用。

tf get only gets contents of a folder recursively (not solution). It does not look at project dependencies and so on. That won't work.

推荐答案

TFS有 .Net SDK ,允许您创建自己的与TFS服务器交互的自定义​​程序。您可以编写一个小程序来执行您需要的任务:

TFS has a .Net SDK that allows you to create your own custom programs that interact with a TFS Server. You could write a small program that performs the task you need:

TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer("MyServer");
VersionControlServer vcs = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));

WorkSpace[] myWorkSpaces = vcs.QueryWorkSpaces("MyWorkSpaceName", "MyLoginName", "MyComputer");

myWorkSpaces[0].Get(VersionSpec.Latest, GetOptions.GetAll);

这篇关于如何从命令行获取Visual Studio解决方案的最新信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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