This documentation is archived and is not being maintained.

VersionControlServer.CreateWorkspace Method (String, String, String)

Creates a new Workspace.

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

public Workspace CreateWorkspace(
	string name,
	string owner,
	string comment


Type: System.String
The name of the Workspace to create. Must be unique for this owner.
Type: System.String
The owner of the Workspace to create.
Type: System.String
A descriptive comment for the Workspace.

Return Value

Type: Microsoft.TeamFoundation.VersionControl.Client.Workspace
The newly created Workspace object.

The calling identity must have the CreateWorkspace global permission. The workspace has no working folders and the computer attribute is defaulted to the current machine. An exception is thrown if the workspace cannot be created.