Sign up ×
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them, it only takes a minute:

I have a solution that contains a good deal of projects,

I would like to remove the source control bindings completely, how can I do this?

Update: What I really want to do is move one solution and its projects from TFS 2005 -> 2008. Thats why I am removing the bindings, is there a better way to do this?

share|improve this question
    
I don't think you have to remove and re-add the bindings to upgrade to a newer TFS. The 2008 client fully replaces the 2005 client and works in VS 2005 and 2008 for old and new servers. – Bert Huijben Feb 6 '09 at 12:00
1  
I created a VSIX addon that removes TFS bindings and zips up a copy of your solution (also removes all unnecessary files). See visualstudiogallery.msdn.microsoft.com/… – RickAnd - MSFT Sep 4 '14 at 1:22
    
empty Models folder got messed up @RickAnd-MSFT I had to delete and recreate it otherwise it works great. thx – Tom Stickel Aug 29 at 0:04

9 Answers 9

up vote 196 down vote accepted

File -> Source Control -> 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)

share|improve this answer
1  
this is a great answer, I would also like to add - disable your network adapter to avoid any prohblems during this operation – Michael L Jan 15 '09 at 11:23
2  
+1, but unfortunately this still keeps the elements in the project files, as well as keeps the .vssscc files. However, the solution file is cleaned. Used VS 2010 Pro, with this being the first TFS project we've ever used. – James Skemp Dec 12 '11 at 19:57
11  
This assumes you can connect to the original TFS server. – user148298 Nov 19 '12 at 4:23
    
I created a VSIX addon that removes TFS bindings and zips up a copy of your solution (also removes all unnecessary files). See visualstudiogallery.msdn.microsoft.com/… – RickAnd - MSFT Sep 4 '14 at 1:22
    
This does not work if you cannot connect to the original TFS server. – Dean Kuga Feb 21 at 22:20

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.

share|improve this answer
    
That was it, I had this popup too. Thanks. But if I removed the .suo file and start VS I lost my opened files history. Moved the .suo file back, I got my opened files back. So I needed just remove the section. – ibram Jul 24 '12 at 7:05
    
I had a project that was in VSS added to TFS, and VS kept seeing VSS as the source control provider (even though I removed the bindings, which is admittedly a somewhat separate issue). Deleting the above code in the project and re-binding to TFS solved the problem. – 333Mhz Jul 24 '12 at 21:23
    
This works like a charm with a VS2012 project – Rob Angelier Oct 17 '13 at 18:01
1  
Worked great with a VS2012 project; thank you! – contactmatt Mar 25 '14 at 5:10
    
Worked great, THANK YOU!! – user2917239 Apr 3 '14 at 21:49

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

share|improve this answer
1  
Also I forgot to mention, this is a VS 2008 Solution, and I think your answer only works with VS 2005. – Michael L Dec 11 '08 at 11:00
1  
Have tried many different solutions, but this seems to be the simplest and fastest (in Visual Studio 2012). Have worked so far on the solutions I have! – olf May 31 '13 at 13:38
    
Awesome! It's fast, it's simple, it's exactly what I need to clean a project from all TFS bindings. – mrt Feb 18 '14 at 12:10
3  
This doesn't seem to work in 2013 - the Source Control Plugin is stored in the solution. – Rob Sep 9 '14 at 4:55
1  
This worked great for me in VS2013 Ultimate. I was moving a single solution from TFS to SVN and this saved my bacon. – Rob Horton Oct 1 '14 at 21:08

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

share|improve this answer
    
Sorry but this didn't work for me. It kept asking if I wanted to disconnect from the new server and reconnect to the old server. – user148298 Nov 19 '12 at 4:24

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....

share|improve this answer

You could try using this tool which automatically removes the Team Foundation Bindings from a project. http://www.softpedia.com/get/Programming/Other-Programming-Files/Team-Foundation-Binding-Remover.shtml

share|improve this answer

Sometime, the binding info is cached

To clear Team Explorer's cache:

Go to C:\Users\<user>\AppData\Local\Microsoft\Team Foundation\2.0
Delete or rename the Cache folder.

This come from a website I could not find now. Thanks for that guy for the tip.

share|improve this answer

Here you can find another tool (including source code) to remove both SCC footprint from the solution and project files and the .vssscc and .vspscc files. In addition, it removes the output and other configurable directories.

Hth

Stefan

share|improve this answer
    
hmm ... spreading a link to that tool? – kleopatra Aug 26 '13 at 8:25

VS2013 go to menu File -> Source Control -> Advanced -> Change Source Control

Select Solution/Project to unbind and on tool bar click Unbind

Go to menu Tools -> Options, in Options window on the left panel click node Source Control select Plug-in Selection. On drop down Current source control plugin select None.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.