Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Re-establish TFS source control bindings

I have about a dozen Visual Studio 2010 projects I've been working on that are versioned in a TFS repository. Recently I went on a vacation and upgraded my computer's OS to Windows 7 64 bit.

I've reinstalled Visual Studio, and I can connect to my Team Foundation Server and see my projects...only my bindings aren't working correctly. Most of the time none of my files seem to be under source control, but in a couple of projects my source control bindings are OK in the root folder, but not working in subfolders off the project root.

I've tried undoing the binding, opening from source control, and deleting the folder and doing a get latest version. None of these has fixed the problem.

Any thoughts on restoring my bindings?

UPDATE

After poking around I can see there seems to be an extra folder in the path of my "invalid" projects...I've got no idea how it got in there, but this seems to be throwing off my mappings.

like image 663
Tim Avatar asked Jan 02 '13 20:01

Tim


People also ask

How do you rebind a project in TFS?

Go to File > Source Control > Change Source Control and check that the solution is bound. If not, select everything and click Bind.

How do I bind a Visual Studio solution to TFS 2017?

In Visual Studio 2017, you can use File -> Source Control -> Advanced -> Change Source Control to open the Change Source Control dialog: NOTE: The black bars are intentional. Now, all you have to do is select the unbound solution file and click the Bind item from the top menu of the dialog.


2 Answers

You say you've tried undoing the binding, but have you tried rebinding back to source control?

In Visual Studio:

  • Open a solution with the problem
  • Choose the solution in Solution Explorer
  • Pick File->Source Control->Change Source Control
    Visual Studio 2013/2015: File->Source Control->Advanced->Change Source Control
  • Unbind any projects that are bound but not working correctly.
  • Bind all projects that are now unbound.
like image 104
Joel Rondeau Avatar answered Sep 27 '22 00:09

Joel Rondeau


When you have an invalid binding and unbinding/binding a project doesn't work, try the following:

  1. Unbind project in Change Source Control
  2. Unload project in Solution Explorer (For a website-project 'unload project' is not in the context-menu but in the 'Website' menu)
  3. Reload project in Solution Explorer

Works for me all the time...

like image 29
Cyril Mestrom Avatar answered Sep 23 '22 00:09

Cyril Mestrom