4

I am trying to get the build information of a collection using BuildHttpClient. But it is throwing

VssResourceNotFoundException: API resource location {GUIS} is not registered on http://tfsserver/tfs

The following code sample produces the error:

 var url = new Uri("http://tfsserver:8080/tfs");
 TfsTeamProjectCollection ttpc = new TfsTeamProjectCollection(url);
 BuildHttpClient client = ttpc.GetClient<BuildHttpClient>();
 List<Build> builds = client.GetBuildsAsync().Result;
riQQ
  • 9,878
  • 7
  • 49
  • 66
karz
  • 41
  • 3
  • It might also be a problem with version See my response in: https://stackoverflow.com/questions/44299586/api-resource-location-is-not-registered/57789384#57789384 – pawciu Sep 04 '19 at 13:25

1 Answers1

5

You're specifying the location of your TFS server, but not the project collection. You need to specify a project collection in the URI.

Ex: var url = new Uri("http://tfsserver:8080/tfs/DefaultCollection");

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120