Visual Studio 2012 project lost link to TFS

2020-06-14 07:17发布

问题:

So I came back to a project that I was working on a few months ago, and when I load it one of the projects seems to have lost the link to it's entry in TFS. The solution explorer doesn't show the lock icons for it, but I still see it in TFS.

I tried performing a add to source control but it says that the items already exist.

Anybody have ideas on how to fix this?

I'm trying to avoid remapping because there are a few branches, and I'm not even sure that will fix it.

回答1:

Your solution has lost the TFS binding, you can do the following to fix it. First open the solution/project you wish to bind in Visual studio then:

  1. Highlight the project or solution you wish to bind to Team Foundation version control in Solution Explorer.
  2. On the File menu, click Source Control, and then click Change Source Control.
    3.In Change Source Control dialog box, click Bind.

MSDN Link

Update for VS 2013 (thank you Caad9) - In VS 2013 [Ultimate at least] there's an additional level in the menu; File - Source Control - Advanced - Change Source Control... which brings up the dialog