0

我正在使用 TFS API 连接到 Team Foundation Server。在 Server URI 中,我传递了服务器的主机名。我收到错误的 URI 格式错误。

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

4

1 回答 1

5

我认为您需要 Team Project Collection 的 URL,而不仅仅是服务器,可能:

http://server:8080/tfs/collection

在MSDN上有一个连接示例,但它遍历 TFS 实例上的所有项目集合,但使用该示例代码,您可以检查TfsTeamProjectCollection.Uri以确认要使用的正确 URI。

于 2011-05-16T11:05:48.970 回答