Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

VersionControlServer.GetTeamProject 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 a specified team project.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)
public TeamProject GetTeamProject(
	string name
)

Parameters

name
Type: System.String

The name must specify a team project directly ($/CmdLine). To get the team project associated with any arbitrary file or folder inside Team Foundation Server, you must use GetTeamProjectForServerPath.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.TeamProject
The returned TeamProject object contains the name (which you passed in), check-in and checkout policies, and note fields for the specified team project. If no project is found, an exception occurs. You can use the TryGetTeamProject method to avoid this exception.
ExceptionCondition
[VersionControlException]

An exception is thrown if the team project does not exist in the database.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.