TfsTeamProjectCollection API

2019-03-05 06:09发布

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();

标签: tfs
1条回答
神经病院院长
2楼-- · 2019-03-05 06:28

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.

查看更多
登录 后发表回答