我正在制作一个asp.net网络表单,其中我需要所有TFS验证后的项目,我已经通过以下代码完成了
var collectionUri = new Uri("https://project.visualstudio.com/DefaultCollection");
var credential = new NetworkCredential("username", "password");
var teamProjectCollection = new TfsTeamProjectCollection(collectionUri, credential);
teamProjectCollection.EnsureAuthenticated();
答案 0 :(得分:2)
您只需编写 Linq 查询,如下所示: -
WorkItemStore workItemStore = new WorkItemStore(teamProjectCollection);
var project = (from Project pr in workItemStore.Projects
select pr);