Restore TFS source control bindings

I have about a dozen Visual Studio 2010 projects that I have been working on that are versioned in the TFS repository. I recently went on vacation and upgraded my computer OS to the 64-bit version of Windows 7.

I reinstalled Visual Studio and I can connect to my Team Foundation Server and see my projects ... only my bindings are not working correctly. In most cases, none of my files seem to be under source control, but in several projects my source code bindings in the root folder are fine, but they don’t work in subfolders from the project root.

I tried to unlink, open the original control and delete the folder and get the latest version. None of them fixed the problem.

Any thoughts on restoring bindings?

UPDATE

After shaking, I see that an additional folder seems to be added on the way to my "invalid" projects ... I have no idea how it got there, but it seems to drop my mappings.

+60
version-control tfs visual-studio-2010
Jan 02 '13 at 20:32
source share
7 answers

You say you tried to unlink, but did you try to return to the original control?

In Visual Studio:

  • Open the solution to the problem.
  • Select a solution in Solution Explorer
  • Choose File-> Source Control-> Change Source Control
    Visual Studio 2013/2015: File-> Source Control-> Advanced-> Change Source Control
  • Untie any projects that are connected but not working correctly.
  • Link all projects that are now unrelated.
+80
Jan 02 '13 at
source share

If you have the wrong binding and disconnect / binding, the project does not work, try the following:

  • Cancel project in Change control source
  • Unload the project in the solution explorer (for the project unloading the project "site-project" is not in the context menu, but in the "Website" menu).
  • Refresh project in Solution Explorer

Works for me all the time ...

+51
Apr 11 '14 at 11:06
source share

I agree with Joel - usually untieting and re-tying corrects him.

However, if reconnecting does not work, you can try directly editing the solution files. I have seen cases where TFS bindings are in the solution file twice and seem inaccurate for some reason. They may have the wrong number of projects and projects that have nothing in common but are still listed in the solution file.

When this happens (quite rarely), I edit the files and make them the way they should be. For example, I will remove the 2nd set of TFS bindings (GlobalSection (TeamFoundationVersionControl) or fix any other inconsistencies that I see. Then I will reboot the solution and usually fix the problem. I would definitely use this fix as a last resort though.

+9
Jan 02 '13 at 22:40
source share

The following steps helped me fix invalid projects in Visual Studio 2015 ...

  • Click the "Invalid" project in Solution Explorer.
  • Open β€œFile β†’ Source Control β†’ Advanced β†’ Change Source Control”
  • Select a project and click Cancel.
  • In Solution Explorer, unload the project.
  • In Solution Explorer, reload the project.

Link: https://nooblikeaboss.wordpress.com/2015/02/17/how-to-fix-tfs-invalid-binding-in-visual-studio/

+7
Apr 7 '16 at 0:36
source share

I first saw this problem when opening an existing (and previously working) solution in a recently installed Visual Studio with a newly created workspace.

Detaching and re-binding did not help me solve this problem. But he left when I made the latest version. TFS showed that the files are conflicting, and I resolved the conflicts by overriding the local copy. Previously, invalid bindings were shown as valid.

+1
Nov 17 '16 at 13:59
source share

When I renamed my solution, I ran into this error. I tried all of the above, and he did not resolve the situation.

The actual solution for me was to edit the assembly definition with a new solution name

  • My Assemblies> Right-click Assembly Definition> Change My Assembly Definition> Process
  • Note that "1. Required> Assembly Solution" refers to the old Soluton name.
  • Click "..." next to "Build Solution",
  • Find a new solution. Click
  • Save assembly definition
  • Rebuild
0
Jul 09 '14 at 13:10
source share

Verify that the solution has already been added to the source code: File> Source Control> Add Solution to Source Control.

-one
Jul 04 '16 at 20:23
source share



All Articles