Monday, February 14, 2011

Migrating project from one TFS to another

As I wrote in couple of my previous posts, we've migrated from TFS 2008 to 2010. This mean new install and btw also new server name.

To make thing interesting, we had to continue work on the code-base in the mean time (un offline mode) and now how to connect it back to the new server?

First - lets sort out workspaces. Get TFS Sidekicks - free, yet priceless tool. Get connected to the new server. Now, in the Workspaces sidekick window, clear out "Owner" and "Computer" fields in the search criteria and hit "Search". This will give you list of all the workspaces that are registered on the server. In my case, I just deleted the ones associated with the TFS2008 instance (as it didn't exist anymore). This "freed-up" the existing folders and I could use them for binding to new TFS2010.

Now you have to remove the workspace entries from local machine. Use the "TF" command tool. For example, executing following statement in the VS's command prompt will show workspaces defined on the computer:

tf workspaces

And this will delete all of them (or you can delete them individualy by name):

tf workspaces /remove:*

Now, you can get latest version of the code from the new TFS version, go offline, ovewrite updated files, go online again and voila!

No comments: