Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Working with Team Foundation Server Workspaces (Team Explorer Everywhere)

Visual Studio 2010

A workspace for Visual Studio Team Foundation Server comprises a set of working folder mappings. These mappings represent the location of your client-side folders on your local disk and the corresponding Repository Folders. In addition, the name of the workspace owner and the name of the computer on which the workspace is used are also stored in Team Foundation Server.

By default, the local working folder paths are set to projects in the current Eclipse workspace directory when you share or import projects. This topic describes the tasks that you can perform in your Team Foundation Server workspace.

In this topic

An Eclipse workspace is a container for projects, much like a solution in Visual Studio. A Team Foundation Server workspace maps your local folders to folders on an instance of Team Foundation Server. In the local working folders for your Team Foundation Server workspace, you can add, edit, delete, move, rename, or otherwise change version-controlled items without affecting the folder on the version control server. You can also build and test changes without affecting the items on the version control server. The system registers changes to local items as pending changes. When you perform a check-in operation, you commit the local changes to the folder on the version control server. The check-in operation registers the update and makes the update available to other members of the team.

A workspace mapping is a list of active and cloaked items. When you map a local folder to a folder on the server for Team Foundation version control, the system implicitly creates a mapping between all its current and future subfolders. For example, you might map $/projects to c:\projects, add a project that is named $/projects/project_one, and then get all files in the workspace. If you do this, Team Explorer Everywhere automatically creates a local working folder that is named project_one in the C:\projects directory.

You must have a Team Foundation Server workspace before you can perform Team Foundation version control commands on your computer. Team Foundation stores the following information about your workspaces:

  • A list of all the files in your workspace.

  • The version of each file.

  • A list of the pending changes.

Because the server stores this information, other users who have the correct permissions can duplicate your working environment on their computers. However, they will not be able to see details for any pending changes. For more information, see the following topic on the Microsoft Web site: Get Command (Team Foundation Version Control).

Mapping Local Folders to Folders on the Version Control Server

Workspace mapping establishes a client-side working folder. This is where you put files and subfolders when you execute a Get operation.

You can add and remove mappings for a workspace by using the Team Foundation Server plug-in for Eclipse or by using the workfold command from the Cross-platform Command-Line Client for Team Foundation Server. For more information, see Working with Team Foundation Server Workspaces (Team Explorer Everywhere).

You can also provide cloak mappings. Cloak mappings prevent the retrieval of files and subfolders in the specified server folder when you execute the Get operation. You can establish workspace mappings manually in the Create Workspace dialog box. Otherwise, Team Foundation will create the workspace mappings automatically when you add files to version control. For more information, see Add or Remove a Team Foundation Server Workspace.

Required Permissions

To view Team Foundation Server workspaces, you must have the Read permission set to Allow. To view working folder mappings, you must be the owner of the specified or implied workspace or have the global Administer workspaces permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

To view your Team Foundation Server workspaces

  1. In Project Explorer or Package Explorer, right-click an Eclipse project that is under version control, point to Team, and click Manage Workspaces.

    The Workspaces dialog box appears. It shows you the list of your Team Foundation Server workspaces.

  2. If you want to view the working folders and mappings, click the Team Foundation Server workspace for which you want to view mappings, and then click Edit.

    The Edit Workspace dialog box appears. It provides a list of your working folders. For each mapping, the list includes the status (active or cloaked), the folder on the server, and the corresponding local folder.

To view your Team Foundation Server workspaces from a command prompt

  1. Open a command prompt.

  2. Type tf workspaces, and press ENTER.

    A list of all workspaces for the current user on the current computer appears.

    For more information, see the following page on the Microsoft Web site: Workspaces Command (Team Foundation Version Control).

Each Team Foundation Server workspace has an associated set of working folders that map the folder on the version control server to a folder on your local computer. You can decide to map only the immediate children of a folder on the server to a local workspace. You can do this by providing an asterisk wild-card character when you specify the folder. Otherwise, by default all the children of the folder on the server are recursively mapped to the local workspace.

NoteNote

Instead of deleting a working folder mapping, you can change it to a cloaked status to save space on your local disk. You might choose to do this if you will later need to get those files and want to define all of your mappings at the start of the project. For more information, see Cloak or Uncloak Working Folders.

Mapping only one level in a version control hierarchy can limit the number of items that are downloaded to the client computer. This provides faster download times and saves disk space on the client computer.

Required Permissions

To perform these procedures, you must be the owner of the specified or implied workspace or have the global Administer workspaces permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

To map working folders

  1. View the working folders for your Team Foundation Server workspace. For more information, see View Team Foundation Server Workspaces and the Working Folders.

  2. In the Working folders list, click Click here to enter a new working folder in the Source Control Folder column.

  3. In Source Control Folder, type the path of the server folder that you want to map to a local folder, or click the Browse button (...) to specify the folder.

  4. In Local Folder, type the path of the local folder that corresponds to the server folder, or click the Browse button (...) to specify the folder.

  5. (Optional) If you want the mapping to be cloaked (cloaked files are not copied to your local folder), change the Status column from Active to Cloaked.

  6. Repeat steps 2 through 5 until you have added all the mappings that you want, and then click OK.

To remove working folder mappings

  1. View the working folders for your Team Foundation Server workspace. For more information, see View Team Foundation Server Workspaces and the Working Folders.

  2. In the Working folders list, right-click the row that corresponds to the working folder mapping that you want to remove, and then click Delete.

  3. Repeat the previous step for any other mappings that you want to remove, and then click OK.

To change working folder mappings

  1. View the working folders for your Team Foundation Server workspace. For more information, see View Team Foundation Server Workspaces and the Working Folders.

  2. In the Working folders list, in Local Folder, update the path of the local folder that corresponds to the mapping that you want to change.

    Caution noteCaution

    You should not change the local folder mapping if you have pending changes in the local folder or if the local folder is mapped in your Eclipse workspace.

  3. Repeat the previous step for any other mappings that you want to change, and then click OK.

To add or update working folder mappings from a command prompt

  1. Open a command prompt.

  2. Type tf workfold ServerFolder LocalFolder, and then press ENTER. Replace ServerFolder with the folder on the instance of Team Foundation Server. Replace LocalFolder with the path on your local computer that you want to map to that server folder. If a mapping already exists, it will be replaced.

    For more information, see the following page on the Microsoft Web site: Workfold Command (Team Foundation Version Control).

    Important noteImportant

    You should not change your working folder mappings if you have pending changes in the local folder or if the local folder is mapped in your Eclipse workspace.

To remove working folder mappings from a command prompt

  1. Open a command prompt.

  2. Type tf workfold -unmap LocalFolder, and then press ENTER. Replace LocalFolder with the path on your local computer that you want to map to that server folder.

    For more information, see the following page on the Microsoft Web site: Workfold Command (Team Foundation Version Control).

    Important noteImportant

    You should not remove your working folder mappings if you have pending changes in the local folder or if the local folder is mapped in your Eclipse workspace.

By setting the working folder status to Cloaked, you can specify that a local folder should not copy files from the server when you perform a Get operation. You might choose to do this to conserve space on your local disk. If you later decide that you need to get files in those cloaked folders, you must change the status to Active and then perform a Get operation.

Required Permissions

To perform these procedures, you must be the owner of the specified or implied workspace or have the global Administer workspaces permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

To cloak or uncloak a working folder

  1. View the working folders for your Team Foundation Server workspace. For more information, see View TFS Workspaces and the Working Folders.

  2. To cloak a working folder, in the Working folders list, change the Status to Cloaked for the local folder that you want to change.

    Caution noteCaution

    You should not change the status to Cloaked if you have pending changes in the local folder.

  3. To uncloak a working folder, in the Working folders list, change the Status to Active for the local folder that you want to change.

  4. Repeat step 2 or 3 for any other local folders that you want to change, and then click OK.

To cloak a working folder from a command prompt

  1. Open a command prompt.

  2. Type tf workfold -cloak LocalFolder, and then press ENTER. Replace LocalFolder with the name of the folder that you want to cloak.

    For more information, see the following page on the Microsoft Web site: Workfold Command (Team Foundation Version Control).

    Caution noteCaution

    You should not change the status to Cloaked if you have pending changes in the local folder.

To uncloak a working folder from a command prompt

  1. Open a command prompt.

  2. Type tf workfold -decloak LocalFolder, and then press ENTER. Replace LocalFolder with the name of the folder that you want to uncloak.

    For more information, see the following page on the Microsoft Web site: Workfold Command (Team Foundation Version Control).

A single Team Foundation Server workspace can contain multiple team projects. You might want to maintain multiple copies of source files pointing to different versions of files. This can be helpful if you are working on a new release but must be able to refer back to the source files from a previous release. Also, adding a dedicated test workspace on your computer is useful when you perform peer reviews of a team member's code.

In the Team Foundation Server plug-in for Eclipse, you must use a different Eclipse workspace for each Team Foundation Server workspace.

Required Permissions

To modify or delete an existing workspace, you must own it or have the global Administer workspaces permission set to Allow. To add a workspace, you must have the global Create a workspace permission set to Allow. To add workspaces for other users, you must have the Administer workspaces permission set to Allow. For more information, see the following topic on the Microsoft Web site: Team Foundation Server Permissions.

To add a Team Foundation Server workspace

  1. In Project Explorer or Package Explorer, right-click an Eclipse project that is under version control, point to Team, and click Manage Workspaces.

    The Workspaces dialog box appears. It shows you the list of your Team Foundation Server workspaces.

  2. Click Add.

    The Add Workspace dialog box appears.

  3. In Name, provide a descriptive name for the new workspace.

  4. In Comment, you can provide additional information about the workspace. For example, you might provide information about the release to which the workspace corresponds.

  5. (Optional) Add one or more working folder mappings by performing the following steps:

    1. In the Working folders list, click Click here to enter a new working folder in the Source Control Folder column.

    2. In Source Control Folder, type the path of the server folder that you want to map to a local folder, or click the Browse button (...) to specify the folder.

    3. In Local Folder, type the path of the local folder that corresponds to the server folder or click the Browse button (...) to specify the folder.

    4. (Optional) If you want the mapping to be cloaked (cloaked files are not copied to your local folder), change the Status column from Active to Cloaked.

    5. Repeat steps 5a through 5d until you have added all the mappings that you want.

    You can add more mappings later. For more information, see Add, Remove, or Change Working Folder Mappings.

  6. Click OK to create the Team Foundation Server workspace.

To add a TFS workspace from a command prompt

  1. Open a command prompt.

  2. Type tf workspace -new -collection:URL WorkspaceName and then press ENTER. Replace URL with the path of your team project collection. Replace WorkspaceName with the name that you want to give the new Team Foundation Server workspace.

    For more information, see the following topic on the Microsoft Web site: Workspace Command (Team Foundation Version Control).

To remove a Team Foundation Server workspace

  1. In Project Explorer or Package Explorer, right-click an Eclipse project that is under version control, point to Team, and click Manage Workspaces.

    The Workspaces dialog box appears. It shows you the list of your Team Foundation Server workspaces.

  2. In the Workspaces list, click the Team Foundation Server workspace that you want to remove, and then click Remove.

    Caution noteCaution

    When you delete a Team Foundation Server workspace, you lose all pending changes in that workspace. If you are unsure whether you have pending changes, you should cancel the operation and check in or discard any pending changes before you remove the workspace.

  3. To continue with the remove operation, click OK in the confirmation dialog box.

To remove a Team Foundation Server workspace from a command prompt

  1. Open a command prompt.

  2. Type tf workspace -delete WorkspaceName, and then press ENTER. Replace WorkspaceName with the name of the Team Foundation Server workspace that you want to delete.

    For more information, see the following topic on the Microsoft Web site: Workspace Command (Team Foundation Version Control).

    Caution noteCaution

    When you delete a Team Foundation Server workspace, you lose all pending changes in that workspace. If you are unsure whether you have pending changes, you should cancel the operation and check in or discard any pending changes before you remove the workspace.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft