- var projectCollectionUri = new Uri("http://tfs2010:8080/tfs/MyCollection");
- var projectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(projectCollectionUri, new UICredentialsProvider())
- projectCollection.EnsureAuthenticated();
- var vcs = projectCollection.GetService<VersionControlServer>();
- var teamProject = vcs.GetTeamProject("SomeTeamProject");
- var workItemPolicy=new WorkItemPolicy();
- foreach (PolicyType policyType in Workstation.Current.InstalledPolicyTypes)
- {
- if (policyType.Name == workItemPolicy.Type)
- {
- teamProject.SetCheckinPolicies(new PolicyEnvelope[] { new PolicyEnvelope(workItemPolicy, policyType) });
- break;
- }
- }
Fuente:
http://bartwullems.blogspot.com/2012/02/team-foundation-server-2010-enable.html#
No hay comentarios:
Publicar un comentario