Pushparaj
Pushparaj

Reputation: 99

TfsTeamProjectCollection API

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

Upvotes: 0

Views: 6249

Answers (1)

Richard
Richard

Reputation: 108995

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.

Upvotes: 5

Related Questions