Search code examples
tfsvisual-studio-2013workspace

TFS workspaces with the same computer name


I have a tfs on visualstudio.com and I access it from my home and work by using same live.com login. These two computers are named the same (even the full paths to the solution folder are the same) and thus the workspaces got named the same. Now, when I try to do get-latest, it never gets me anything whether I am at home or at work because it probably thinks it already has all latest files in it. Assuming my hypothesis is right, is there a way to make these look distinct to the tfs ? The only way to get-latest for me is to get-specific and mark the second tick, but it also overrides my web.config file (which is not exactly the same since the connection strings are a bit different) which is excluded from the project for obvious reasons (to not be locked/changed since each user needs it different for their own sql server connection string)


Solution

  • Workspaces are uniquely identified by workspace name and username. However TFS only sends a list of "local" workspaces to each machine that you use based on its name. If you have two machines with the same name then they both workspaces will be listed as local to that machine and Visual Studio will get confused and your workspaces will be corrupted. To solve this issue you need to rename one of your computers.

    You can work around it without renaming the computers by creating two workspaces with names like "home" and "work". You will however need to make really sure that you only use one in each location as crossover will give you the same problem as above.