Tutorial :TFS: Can a workspace be migrated to another computer?



Question:

I have one workspace A with files checked out on computer A. Now I want to continue development on computer B. I copy the files from computer A and creates a new workspace B with mapping to the copied files.

Now Visual Studio wont allow me to check in the files since they are already checked out in workspace A.

How can I resolve this without having to check in the files first on computer A?


Solution:1

Create a new workspace on B, copy the directories over from A and use team foundation power tools 2008 to checkout all modified files:

Open a cmd window, then

cd c:\wherever\your\workspace\is  tfpt online /recursive /adds /deletes /diff .  

tfpt will analyze a directory tree and checkout any modified file for edit (and optionally also "add" or "delete" files as necessary.)

make sure you verify what tfpt did, before you check in


Solution:2

Workspaces are bound to a user, so you will see your old workspace when working on the new machine.

So just select your old workspace from the workspace dropdown in Source Control Explorer and checkin your files.


Solution:3

I got a new laptop and installed Windows 7 on it. The product came with a new feature in the Control Panel called Getting Started. Using this feature, I transfered my files from my old laptop to my new laptop using Transfer your files. This was extremely helpful because it copied all of my source files from Computer A to Computer B for Visual studio 2008. So, I did not have to do that manually. Once the transfer finished, I downloaded the Power Shell for Microsoft Team Foundation Server 2008 Power Tools (tfpt installer) and followed the instructions in Step 2 above by going to Start->All Programs->Microsoft Team Foundation Server 2008->PowerShell Console. When the command window opened, I entered the commands: cd c:\wherever\your\workspace\is tfpt online /recursive /adds /deletes /diff .

It worked like a charm!


Solution:4

To migrate from computer A to computer B without having to check in your code:

  1. Don't copy over your working directories from the old computer A
  2. Connect to tfs on the new computer B
  3. Get all the projects you need from tfs (do a get) on computer B
  4. Make a shelveset from the old computer A
  5. On computer B, under Team Explorer, unshelve the shelveset you made in step 4.

You will not lose a thing.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »