i am making a asp.net web form in which i needed all the Projects which are there in TFS after authentication which i have already done by the below code
var collectionUri = new Uri("https://project.visualstudio.com/DefaultCollection");
var credential = new NetworkCredential("username", "password");
var teamProjectCollection = new TfsTeamProjectCollection(collectionUri, credential);
teamProjectCollection.EnsureAuthenticated();
You can simply write a Linq query like this:-
WorkItemStore workItemStore = new WorkItemStore(teamProjectCollection);
var project = (from Project pr in workItemStore.Projects
select pr);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.