在TFS中获取可用的工作区 [英] Get available workspaces in TFS
本文介绍了在TFS中获取可用的工作区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用TFS API在当前计算机上获取当前用户的所有工作区列表?
How can i get a list of all workspaces for the current user on the current computer using TFS API?
推荐答案
查找以下有用的链接...
http://www.woodwardweb.com/teamprise/000333.html [
Find following link useful...
http://www.woodwardweb.com/teamprise/000333.html[^]
HTH
我使用TFS API找到了解决方案:
i found the solution using the TFS API:
NetworkCredential networkCredential = new NetworkCredential("username", "password", "domainName");
TeamFoundationServer tfs = new TeamFoundationServer("TFS Server Name", networkCredential);
VersionControlServer versionControl = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
Workspace[] retVal = versionControl.QueryWorkspaces(null, "username", "computername");
这篇关于在TFS中获取可用的工作区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文