TfsTeamProjectCollection API

♀尐吖头ヾ 提交于 2019-12-20 07:14:06

问题


I'm using the TFS API to connect to Team Foundation Server. In the Server URI , I'm passing the hostname of the server. Me getting a Bad URI format error.

teamFoundationServer = new TfsTeamProjectCollection(new Uri(this.Server,UriKind.Absolute), this.Credentials); teamFoundationServer.EnsureAuthenticated();


回答1:


I think you need the URL of the Team Project Collection, not just the server, probably:

http://server:8080/tfs/collection

There is an example of connecting on MSDN but it iterates through all the project collections on the TFS instance, but with that example code you could examine TfsTeamProjectCollection.Uri to confirm the correct URI to use.



来源:https://stackoverflow.com/questions/6015913/tfsteamprojectcollection-api

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!