Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I completely remove TFS Bindings

People also ask

How do I remove Team Foundation Server version control?

Right-click your project or project suite in the Project Explorer and then click Source Control > Unbind From Team Foundation Server.

How do I delete a TFS server in Visual Studio?

On the Menu bar of Visual Studio, go to Team and select Disconnect from Team Foundation Server. That's it.


File -> Source Control -> Advanced -> Change Source Control and then unbind and/or disconnect all projects and the solution.

This should remove all bindings from the solution and project files. (After this you can switch the SCC provider in Tools -> Options -> Source Control -> Plug-in Selection).

The SCC specification prescribes that all SCC providers should implement this behavior. (I only tested it for VSS, TFS and AnkhSVN)


I have no File -> Source Control menu in Visual Studio because I've never used TFS with this installation of Visual Studio.

My problem was I was opening a solution from the internet and the original author had forgotten to remove the TFS bindings, so every time I open the solution I'd get an annoying popup saying

"Go Offline

The Team Foundation Server http://some-other-guys-tfs-server/ 
is currently unavailable.

The solution will be opened offline."

To get rid of this, I deleted 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, problem solved.

Update: Saveen Reddy has created a tool to do this. I haven't tried it though.


The simplest solution would be to open Visual Studio, deactivate the TFS Plugin in Tools > Options > Source control and reopen the solution you want to clean. Visual Studio will ask to remove source controls bindings


If anyone needs to do this outside the context of the Visual Studio application - via command-line for example, I wrote a small tool which will strip the source control bindings from Solution And Project files. The source is available here: https://github.com/saveenr/VS_unbind_source_control


Old post, so just adding to the answers of @Matt Frear and @Johan Buret. Both work.

But in Matt's case, you also need to set these (VS 2012) in Notepad/text editor:

SccProjectName = ""
SccAuxPath = ""
SccLocalPath = ""
SccProvider = ""

To each project in the solution file (.sln).

@Johan's answer effectively does this....