This documentation is archived and is not being maintained.

VersionControlServer.GetTeamProjectsForServerPaths Method

At the top level of the Team Foundation Server folder hierarchy are the team projects; the folders immediately below $/ in the tree. All folders and files under source control are directly or indirectly below the team projects. This function gets one or more team projects.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public TeamProject[] GetTeamProjectsForServerPaths(
	string[] serverPaths


Type: System.String[]

Each server path may specify a team project directly ($/CmdLine) or any file or folder contained within a team project ($/CmdLine/parser.cs).

Either way, the team project (or top-level folder) will be part of the returned array.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.TeamProject[]
The returned TeamProject objects contain the name (which you passed in), check-in and checkout policies, and note fields for the specified team projects. If any passed server path did not correspond to a valid team project, that entry will be left out of the returned array and , there is no guarantee that the third object in the returned array will reflect the third string in the passed array.

If a path does not correspond to a team project in the database, there will not be a corresponding TeamProject object in the list returned.