I have installed Visual Studio 2010 and also the VS 2010 TFS client and am connected to my TFS server. Everything looks neat and exciting. Now when I try to Map my local folder to my Projects in TFS it comes up with a message stating “The Path … is already mapped in workspace ….” It looks like my local folder is mapped to the previous workspace I had in VS 2008, so it would not let me map to my VS 2010 Projects. What can I do to resolve this?
Using the tf Utility
You can delete the obsolete workspaces which you are no longer going to use by using the tf command line utility which comes with Visual Studio 2010. You can use the tf utility by going to your Visual Studio Command Prompt. And Type the following commands.
You can get the list of Workspaces in your local computer by the following command.
C: \\> tf workspaces
Or to get if for a specific user:
C: \\> tf workspaces /owner:OWNERNAME
Now you can delete the workspace which is causing problem by the following command.
C:\\>tf workspace /delete /server:YOURBUILDSERVER WORKSPACENAME;OWNERNAME
But the problem with using the tf utility is, you need to have your old Build Server (in my case the TFS 2008) server to be able to delete my workspaces. My old TFS 2008 build server had already been packed up and was no more available, so I could not use the tf utility and had to come up with another solution.
And here is another easy solution. Here is what I did.
I just renamed my local folder which I was trying to map to the new VS 2010 TFS to something new. For eg. I changed it from TFS to TFS2010
Then I mapped the Project Folder in VS 2010 TFS to my renamed local folder and it worked.
That was pretty cool.