Mapping to a TFS Source Control Folder

So often I see developers mapping to their local folder from the middle of the source control tree to a folder on their desktop, then another folder to a different location. It gets very messy very quickly.

Some people may like to map folders this way, however I prefer a cleaner mapping implementation. When working on a team I would rather have the same folder structure as the server and everyone else on the team. Also it’s nice not to have to map each app I work on. I would rather just map once and be done with it.

Here is what I do: From a clean never been mapped TFS source control repository. If you already have  mappings check everything in and remove them before doing this. (These instructions are for Team Explorer 2012)

Open the Source Control Explorer

Select the top node which should be your Server\Collection

Right click and select Advanced | Map to Local Folder from the context menu

Create a folder on the drive of your choice with the same name as the Collection. I like to create a Source folder then inside that folder create the Folder with the same name as the collection.  That way if I have more than one Collection they are separate folders but all under Source.

image

 

 

 

 

 

Once you hit the MGetLatestap button you will be prompted to get latest of everything in the collection.

 

 

 

 

I recommend you select No. I doubt you want everything, do you?

Now traverse the Source Control tree look and watch the Local Path at the top it changes as you move. To get a particular application just right click on the folder and select Get Latest Version and it will get it into the folder structure you see.

Have everyone on the team do this. Then when you go from machine to machine you always know where to find the source. Also it looks just like the server.