11

Is there a way to import Visual Studio TFS workspace, I have over 30 workspace and I need to import them to a TFS on new machine. Thanks

Valentin Rocher
  • 11,667
  • 45
  • 59
Murtaza Mandvi
  • 10,708
  • 23
  • 74
  • 109

2 Answers2

21

If you want to clone the structure of your workspaces but leave the old ones alone, run

tf workspace /server:yourserver /new NewName /template:OldName;OldOwner

http://msdn.microsoft.com/en-us/library/tzy14b58.aspx

If you want to permanently migrate your workspaces from one machine to another, run...

tf workspaces /server:yourserver /updatecomputername:OldComputerName

http://msdn.microsoft.com/en-us/library/54dkh0y3.aspx

...then move all your files from the old box to the new one. If you're unable to use the same paths, you'll have to update the workspace definitions.

Richard Berg
  • 20,629
  • 2
  • 66
  • 86
  • If you only have Visual Studio installed, you will also need Team Explorer which installs `tf.exe` to e.g. `C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE` for the `tf` command to work: http://stackoverflow.com/questions/5503858/how-to-get-tf-exe-tfs-command-line-client#5507337 – SharpC Dec 12 '14 at 10:49
  • What an atrocious path again – Johan Boulé Apr 04 '15 at 22:51
  • OldOwner looks like "Lastname, Firstname" in the tfs installation I use. – dfrevert Jun 02 '15 at 15:23
  • Just a quick update to this. If you open up a VS command prompt today using VS 2017 (just do a search for command and it will show up) the tf command will be recognized without having to tool around to find it. Also a heads up the server needs to be the full http:// server address including the collection name. This command still works perfect in the latest version. Just had to do it again when migrating to a new laptop. – Mike Aug 24 '18 at 12:27
0

Microsoft has documentation on this.

http://msdn.microsoft.com/en-us/library/ms404879.aspx

antik
  • 5,282
  • 1
  • 34
  • 47