You can't change source control bindings through a TFS command simply.
However, as a workaroud you can delete the .suo
next to the .sln
file, and then opened the .sln
file in Notepad and deleted this entire section:
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {xxxxx}
SccTeamFoundationServer = http://some-other-guys-tfs-server/
SccLocalPath0 = .
SccProjectUniqueName1 = xxDemo\\xxDemo.csproj
SccProjectName1 = xxDemo
SccLocalPath1 = xxDemo
EndGlobalSection
Save the .sln
in Notepad and then open in Visual Studio.
More details please refer Matt Frear's answer in this question How can I completely remove TFS Bindings
Update
No, you also can't do this through command Line to add bindings.
TF.exe
are version control commands. You may have to manually rebind it in VS.
On the File menu, click Source Control, and then click
Change Source Control. In Change Source Control dialog box, click Bind.