Bagikan melalui


How to: Get the Source for Your Team Project

In Source Control Explorer, you can get version-controlled items from the server and populate them into your local workspace for your team project. However, you must have a local workspace before you start this process. For more information, see How to: Create a Mapped Workspace. The following procedure shows you how to populate a workspace with items from the server.

Required Permissions

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

To populate a workspace

  1. Create a new workspace.

    For more information, see How to: Create a Mapped Workspace.

  2. On the View menu, click Other Windows, and then click Source Control Explorer.

  3. In Source Control Explorer, click Workspace on the toolbar, and select the new workspace from the list.

    When you select the new workspace, items that appear dimmed indicate that they have not been copied to your local workspace.

  4. Go to a folder or file that you want to add to the new workspace, right-click it, and click either Get Latest Version to copy the latest version of the items or click Get Specific Version.

    If you select Get Specific Version, the Get dialog box appears.

  5. In the Get dialog box, be sure you select the file or folder you want to get and then select what type of version you want to get from the Type drop-down list:

    • Changeset   Get a version based on a changeset. For more information, see How to: Find a Changeset.

    • Date   Get a version based on a date. If selected, select a date in the Date list.

    • Label   Get a version based on a label. For more information, see How to: Find Labels.

    • Latest Version   If selected, updates with the latest version on the Team Foundation version control server.

    • Workspace Version   Gets a version based on the workspace.

  6. (Optional) Select the Overwrite writable files that are not checked out option.

    If selected, files from the server will overwrite all files that do not have the read-only attribute associated with them and are not checked out. Only files on the server, which are different, will overwrite the files in the local workspace. By default, this option is not selected.

  7. (Optional) Select the Overwrite all files even if the local version matches the specified version option.

    If selected, files from the server overwrite all files.

    Note

    Visual Studio Team System does not automatically detect changes made outside the Visual Studio integrated development environment. You must also manually update the view in Source Control Explorer. Any changes you made by using, for example, tf.exe or another instance of Visual Studio are now displayed in Source Control Explorer.

  8. Click Get.

    Source Control Explorer appears. If you chose Latest Version in step 5, the system updates the Latest column with the status of Yes.

See Also

Tasks

How to: Create a Mapped Workspace

Other Resources

Getting a Local Copy of Files from the Version Control Server