ajit
ajit

Reputation: 132

Repair Local Visual Studio TFS Workspace Mapping to the previous location

I had issues with my laptop so I had to reinstall windows, How can I remap to the previous workspace I would like to repair or map to the previous local files that Visual Studio was been linked. Does anyone know this can be done?

Upvotes: 0

Views: 2562

Answers (2)

Andy Li-MSFT
Andy Li-MSFT

Reputation: 30432

TFS workspaces are unique to your user name and the remote computer name and workspace information is stored both on your local computer and on the server.

Genearlly if the machine name not changed, the previous workspace will be still available when you connect to the team project.

However if the machine name changed, the previous map will be not available any more. In this case, you can try to delete the existing workspace, or change the mappings (suggest you copy the workspace folder for a backup first). You can select the Workspace menu in Source Control Explorer, and select Workspaces... to open the Manage Workspaces dialog.

Alternatively create a new workspace and map to the previous folder, when get latest it will popup the resove conflicts dialog, just select all the conflict files and click Keep Local File Contents.

If that still not work, just try to add files manually:

  1. Copy previous workspace folder for backup first in case destroyed the local changes.
  2. Delete the $tf foder in the previous workspace (By default the folder is hidden, View > Hidden items to show the folder)
  3. Creat a new workspace and map to the previous folder
  4. Select the new workspace in Souce Control Explorer
  5. Right click the Team Project in Souce Control Explorer --> Add items to Folder...
  6. Select all files then Finish --> Right click the Team Project --> Get latest version --> Resolve the conflicts --> Keep Local File Contents.

enter image description here

Upvotes: 1

Niel Zeeman
Niel Zeeman

Reputation: 677

If the machine name changed, you probably better off remapping a new workspace and copying any changed files over into the new workspace.

Upvotes: 0

Related Questions