views:

441

answers:

1

We're using TFS and we're having problems when we switch branches, it's throwing up problems with the TFS bindings every single time.

We still have

.vspcc files .vsscc files

which is I'm guessing where it stores the bindings, does anyone have any advice on how to easily switch between branches in TFS without pain?

+1  A: 

These files are used to store files that are excluded from source control - and yes, they are themselves under source control. I've never had to worry about these before, so I don't think that's where the problem is.

Bindings are normally stored in your actual proj and sln files.

If you have problems with binding, you actually have some problem with your workspace. Either make a new workspace in a new local folder, and get everything from the server there from scratch (i.e. setting up the workspace mapping through visual studio, opening your solution via the source explorer etc. Don't use any clever tricks here - otherwise strange things happen), or try going to File -> Source Control -> Change Source Control, unbinding all projects and rebinding them. VS will blindly write the binding info anew into your project and sln files if you do this.

Especially make sure that all server paths you're checking out can be mapped to a local path.

Switching between branches is just done by opening the appropriate solution file from the appropriate folder/branch. It's not normal that this gives you problems, obviously.

Kurt Schelfthout
+1 for the workspace mapping suggestion. Every. Single. Time. I have seen a problem with bindings or the fun "stays gray after I get latest" problem it turns out to be bad mapping. I would suggest that the OP deletes the current workspace, then maps something like "c:\projects" to the top level "$/" TFS folder.
Chris Lively