Create a Workspace and Get Files

Before you can work with files that are in version control, you must specify a folder on your local computer to which you will download the files from the server. You can create this workspace by using Visual Studio Application Lifecycle Management (ALM) or by opening a Command Prompt window. After you create a workspace, you typically download all of the files from the version control server into your workspace.

Required Permissions

To perform these procedures, you must have the permissions for Create a workspace or Administer workspaces set to Allow. For more information, see Team Foundation Server Permissions.

Creating a Workspace

To create a workspace

  1. Create or identify a folder on your computer to use as a workspace.

  2. Perform any of these steps:

    • In Visual Studio ALM, on the File menu, point to** Source Control**, click Workspaces, and then click Add.

    • In Visual Studio ALM, in Source Control Explorer, in the Workspace list, click Workspaces, and then click Add.

    • At the Visual Studio 2010 command prompt, type cd followed by the path of your workspace, and then press ENTER. Then type **tf workspace /new /collection:**TeamProjectCollectionUrl, where TeamProjectCollectionUrl is the URL of the team project collection that contains the files that you want to get, and then press ENTER.

  3. In the Add Workspace dialog box, perform these steps:

    1. In the Name box, your user name is entered by default.

      Note

      Normally you do not need to enter a value in the Name box. However, if you want to enter a different value, you must have administrative permissions.

    2. (Optional) In the Computer box, type the name of the computer on which you want to create the workspace.

      The default value is the name of the computer from which you began this procedure.

    3. (Optional) In the Comment box, type a description of the new workspace that can help you remember the purpose of the workspace.

    4. Under Working Folders, in the Source Control Folder column, click the first blank text box and then specify path to folder on the server that contains the files you want to work with. You can specify the folder by typing it in the dialog box or clicking the ellipsis () button and selecting it in the Browse for Folder dialog box.

      Note

      By default, you will map not only the folder that you specified but also all of the subfolders in the tree. To map only the folder and its immediate subfolders, append /* to the path name that appears in the Source Control Folder box.

    5. Under Local Folder, click the text box and then specify the path to the folder on your local computer where you want to work on these files. You can specify the folder by typing it in the dialog box or clicking the ellipsis () button and selecting it in the Browse for Folder dialog box.

    6. Click OK.

  4. If you are using Visual Studio ALM, in the Manage Workspaces dialog box, click Close.

Downloading the Latest Versions of Files and Folders

To download files from the server by using Source Control Explorer

  • In Source Control Explorer, right-click the folder that is mapped to your workspace, and then click Get Latest Version.

    The Get Progress dialog box appears and displays the progress as files and folders are downloaded to your workspace.

To download files from the server by using the Visual Studio Command Prompt window

  1. Click Start, click All Programs, point to Microsoft Visual Studio 2010, point to Visual Studio Tools, and then click Visual Studio 10.0 Command Prompt.

  2. Use the CD command to navigate to the working folder.

  3. Use the tf get command to get the files.

    For more information about the syntax of the tf get command, see Get Command.

See Also

Tasks

Cloak and Uncloak Folders in a Workspace

Get the Source for Your Team Project

Add and Remove a Working Folder in a Workspace

Reference

Workspace Command

Workspaces Command

Workfold Command

Concepts

Set Up your Development Machine to Work with your Team's Project

Set Up your Development Machine to Work with your Team's Project

Using Source Control Explorer

Other Resources

Version Control Workspaces