Update File Versions in Your Workspace

Use the Get command to update the version from the server to the local workspace. The Get command is available through Source Control Explorer, Solution Explorer, or the command line by using the Get Command. For more information, see Create a Workspace to Work with your Team Project.

A get action will copy files to the local computer if you do not have them already. If the files are already there, a get action will update them if they have changed.

Required Permissions

To perform these procedures, you must have the Read permission set to Allow. For more information, see Team Foundation Server Permissions.

To update the version in your workspace from Source Control Explorer

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

  2. In Source Control Explorer, select the folder or file for which you want to update the version to the local workspace and right-click it. Click either Get Latest Version to retrieve the most recent version of the item, or Get Specific Version.

  3. If you click Get Specific Version in the Get dialog box, make sure that you select the folder or file. In the Version area, in the Type list, select the how you want to update the file or folder:

  4. (Optional) Click Overwrite writable files that are not checked out to allow the system to overwrite existing files.

  5. (Optional) Click Overwrite all files even if the local version matches the specified version.

  6. Click Get to complete the update. After the file or folder is updated, double-click to open it for editing.

To update the version in your workspace from Solution Explorer

  1. In Solution Explorer, right-click the solution, project, or individual file on which you want to update the version. Click either Get Latest Version to retrieve the most recent version of the item or click Get Specific Version… to retrieve a specific version.

  2. If you click Get Specific Version… in the Get dialog box, be sure that you select the folder or file, and then in the Version area, in the Type drop-down list, select the desired manner by which you want to update:

    • Changeset   Get a version based on a changeset. For more information, see Find Information About a Changeset.

    • Date   Get a version based on a date. Select a date in the Date list.

    • Label   Get a version based on a label.

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

    • Workspace Version   Gets a version based on the workspace.

  3. (Optional) Click Overwrite writable files that are not checked out to allow the system to overwrite existing files.

  4. (Optional) Click Overwrite all files even if the local version matches the specified version.

  5. Click Get to complete the update. After the file or folder has been updated, double-click to open it for editing.

To update the version in your workspace from the command line

  1. Click Start, click All Programs, and point to Microsoft Visual Studio 2010.

  2. Point to Visual Studio Tools and then click Visual Studio Command Prompt.

  3. Type cd path, where path is the location of the directory used to store your personal copy of the files on the server, for example, c:\projects.

  4. Type tf get itemname and then press Enter.

    Note

    For the full syntax available for the Get command, see Get Command.

See Also

Reference

Get Command

Concepts

Working with Changesets

Other Resources

Getting a Local Copy of Files from the Version Control Server