0
votes

I am working in Visual Studio 2013 with Team Foundation Server 2012. We are in the process of migrating from another source control application and trying to set up TFS.

Our current process is for every developer to have a C:\dev folder on their local PC. The code for each project is checked out to C:\dev, so you have C:\dev\ProjectA, C:\dev\ProjectB, etc. The code for each project is directly in the Project folder under dev. Each project remains separate, just contained in one main folder.

In TFS if I try to map multiple projects to C:\dev I get an error stating "The local folder could not be set to C:\dev because it is already the local folder for another server folder."

I can map the main project collection to C:\dev, but then the projects start looking like C:\dev\ProjectA\Main, C:\dev\ProjectB\Main, etc. We are trying to minimize the folder levels and keep it the same as our current setup.

The other option is to map each individual branch under the Main folder to the specific C:\dev folder it belongs to, but this seems like (needless) extra work.

Is this possible? Or do we need to change our folder structure?

Thanks in advance.

1
Multiple mappings are a royal pain to manage - especially across multiple developers. You'll find it's really easier to just map the development branch out to C:\DEV and then everyone has everything -- but they only work in the solutions/projects they need at the time. It's how I've done it with the last two instances of TFS I've had to work with. In the end, you never really care about the folder structure so much (it mirrors your TFS branch anyhow) and more about what's inside the solutions and solution folders, which you can organize in any fashion.Jason

1 Answers

0
votes

I don't think you'll be able to achieve what you want unless you use multiple mappings, which is a pain to maintain when setting up new machines. It may be possible to script the mappings via powershell or a simple console app, which might cut down on the setup time.

I map to the root of the Collection, but use a short folder name to minimise the path length. For example mapping to C:\dev\tfs would give C:\dev\tfs\projectOne, C:\dev\tfs\projectTwo, etc.