如何从命令行获取Visual Studio解决方案的最新信息?

编程入门 行业动态 更新时间:2024-10-23 12:32:31
本文介绍了如何从命令行获取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解决方案的最新信息?

本文发布于:2023-11-14 19:21:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1588318.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:命令行   最新信息   解决方案   Studio   Visual

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!