TFS: Avoid corresponding paths on VPC’s

Have you ever experienced that you and another developer has a copy of the same VPC and wants to Check Out from TFS to the same path on each of your copy?

If yes, then you also know that TFS won’t allow this. I forgot what error it comes with.

You could change local path or computer name to get around this, but it might not be without trouble.

If you cannot change local path due to it might give you some extra trouble
and you don’t want to change the computer name – this can also cause trouble for SW like SharePoint – then:

Give each user each own virtual path to the C: drive.

Add virtual path

In the above img, there are already three virtual paths pointing at drive c:

  • e:\larstd\
  • e:\raasor\
  • e:\motrak\

Now we want to map yet a path to the drive c:. The path is e:\herfin\:

  • Create the folder e:\herfin\
  • In disk management rightClick drive c:
  • Change drive letter
  • Add
  • Browse to e:\herfin\

 Browsed to new folder

  • OK

New virtual path added

  • OK
  • In visual studio open your workspace in source control explorer
  • Change the mapping c:\ to e:\herfin\ – those two paths are now equal.
  • On you co-developers VPC you set that mapping to something else – like change c:\ to e:\raasor\.
  • Both developers can now check out to their virtual path, so TFS does not bother, but the physical path is still C:\.

    Point Workspace to virtual path

    Happy coding :-)

    The End.

    Advertisements

    Leave a Reply

    Please log in using one of these methods to post your comment:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: