We have an issue connecting TFS workspaces to versions of Visual Studio 2008, 2010, 2012. We get "The path … is already mapped in workspace " issue

StackOverflow https://stackoverflow.com/questions/15573562

Question

Here is what we are trying to do:

In a TFS collection we set up a TFS project “BuildBusinessWebsite”. For this project we will have .Net solutions, SQL Server Reporting Services (SSRS) reports, and SQL Server Integration Services (SSIS) packages. (I have to do development on all three.) We have chosen to set up a folder structure like this in Source Control Explorer with solutions and code in each directory folder:

BuildBusinessWebsite

Development

    Application
    SSRS
    SSIS
Test
    Application
    SSRS
    SSIS
Production
    Application
    SSRS
    SSIS

Now, we are currently developing the SSRS reports and the SSIS packages using Visual Studio 2008 and the application is being developed in Visual Studio 2010. When you connect the second Visual Studio 2010 environment to the same working directory (Local Path: Not mapped) you get the error “The path … is already mapped in workspace …” issue because it is already mapped to the Visual Studio 2008 directory. I need both environments mapped to the same directory as I do not want to keep multiple directories on my machine up to date with “Get Latest”. I am also currently testing the migration to Visual Studio 2012 where it is also asking me to map another location for TFS. My current work around is to create another layer of folder mappings as C:\TFS2008, C:\TFS2010, and C:\TFS2012 with the folder structure above in each. Is there a way to consolidate all these for one location for all the code?

Second issue related to the above is with branching and merging: If there is some way to fix the above then this one is moot, however, when pulling down the folders above from source control and you are utilizing branching and merging, the branching and merging connections between prod, test, and dev do not seem to pull from TFS. They seem to be local to my workspace and machine. Considering the example above where I branch my application from Production to test and test to Development in Visual Studio 2010, when I use Visual Studio 2012, map the Source Control Explorer to another location on my hard drive, and “Get Latest”… After it comes down I lose my branching and merging having to set them back up. Is there a better way to set this up?

Thank you all ahead of time for reading this and thoughts you might have would be greatly appreciated.

Was it helpful?

Solution

TFS Workspaces are uniquely identified by:

  • Workspace Name
  • Workspace Owner (AD Account name)
  • Computer Name (The Computer which it is on)
  • Team Project Collection it is in

The workspace mapping should have nothing to do with the "environment" you are working in. You should either use the TF Admin command to create your workspaces or go to File->Source Control->Advanced->Workspaces... in Visual Studio. Also, create only 1 workspace and do it at the root folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top