Fixing source control bindings with VS 2005 and TFS

Sometimes, for some reason, VS 2005 seems to lose or corrupt source control bindings for projects. In those cases the project will appear not to be under source control; you may also receive error dialogs about source control providers not being available, etc.

The process for reassociating a project with its TFS binding is as follows:

  1. Open the project in VS 2005, and dismiss any error dialogs.
  2. Go to Tools > Options, select the Source Control item, and the Plug-In Selection sub-item. Make sure the drop-down reads "Visual Studio Team Foundation Server". If it does not, select that value in the drop-down and click OK.
  3. Go to File > Source Control > Change Source Control.
  4. Select each line that should be associated with source control (for instance, if the solution isn't under source control, then select only the line for the project). For each line, click the Bind button.
  5. VS should automatically detect the correct TFS location; verify that it selected the correct path.
  6. Click OK. Visual Studio will probably automatically check out the project (and solution, if you rebound it) files. Check these files in with an appropriate comment.