using Microsoft.TeamFoundation.Client; // Connect to TFS Uri tfsUri = new Uri("http://tfs.example.com:8080/tfs/"); TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(tfsUri); // Get the VersionControlServer service VersionControlServer vcs = tfs.GetService();
using Microsoft.TeamFoundation.Client; // Connect to TFS Uri tfsUri = new Uri("http://tfs.example.com:8080/tfs/"); TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(tfsUri); // Get the WorkItemStore service WorkItemStore wis = tfs.GetServiceIn this example, we again create a TfsTeamProjectCollection object to connect to our TFS instance. This time, we call GetService to retrieve the WorkItemStore service, which provides access to TFS work item tracking features. Package library: Microsoft.TeamFoundationServer.Client Both of these examples use the GetService method to retrieve a specific TFS service. The package libraries for these services are Microsoft.TeamFoundationServer.ExtendedClient and Microsoft.TeamFoundationServer.Client, respectively.();