[tfs] How can I completely remove TFS Bindings

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?

This question is related to tfs version-control source-control-bindings

The answer is


  1. Go to File -> Source Control -> Advanced -> Change Source Control (if change source control doesn't appear, click on solution in the solution explorer then try again)
  2. Unbind solution and all projects

Now right click on solution and you will see "Add Project To Source Control". if you want to add project to source control again you might be get some errors that ask you to change the solution folder on TFS. it happens because your solution has some mapping in a workspace yet. remove mapping or delete workspace. now your solution is completely unbind and unmapped from TFS or workspaces.


In visual studio 2015,

  1. Unbind the solution and project by File->Source Control->Advanced->Change Source Control
  2. Remove the cache in C:\Users\<user>\AppData\Local\Microsoft\Team Foundation\6.0

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


The other option is

Delete the workspace

re-map when needed

Make sure to check, rollback (Undo Pending changes)

before you remove workspace

This is quickest and surest one

Good Luck


Next works for me:

  1. Delete all .vssscc (solution binding) and .vspscc (project binding) files
  2. Remove block GlobalSection(TeamFoundationVersionControl) = preSolution from solution file

There could be also information regarding source control in the proj file in tags

<SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> <SccProvider>SAK</SccProvider>

SAK states for "Should Already Know", so it can be kept.


In VS2017

  1. go to Home in Team Explorer
  2. Click on Settings in project section
  3. Click on Repository Settings in Git section
  4. From next window see Remotes section. you will see option for remove

NB: I check that for git repository


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


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


In visual studio 2015,

  1. Unbind the solution and project by File->Source Control->Advanced->Change Source Control
  2. Remove the cache in C:\Users\<user>\AppData\Local\Microsoft\Team Foundation\6.0

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.


I found this tool that helped me get rid of a tfs binding complitly its found here https://marketplace.visualstudio.com/items?itemName=RonJacobs.CleanProject-CleansVisualStudioSolutionsForUploadi

it creates a zip with the removed source binding without modifying the orginal project.


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.


In VS2017

  1. go to Home in Team Explorer
  2. Click on Settings in project section
  3. Click on Repository Settings in Git section
  4. From next window see Remotes section. you will see option for remove

NB: I check that for git repository


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


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


The other option is

Delete the workspace

re-map when needed

Make sure to check, rollback (Undo Pending changes)

before you remove workspace

This is quickest and surest one

Good Luck


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


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


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


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


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


  1. Go to File -> Source Control -> Advanced -> Change Source Control (if change source control doesn't appear, click on solution in the solution explorer then try again)
  2. Unbind solution and all projects

Now right click on solution and you will see "Add Project To Source Control". if you want to add project to source control again you might be get some errors that ask you to change the solution folder on TFS. it happens because your solution has some mapping in a workspace yet. remove mapping or delete workspace. now your solution is completely unbind and unmapped from TFS or workspaces.


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.


Next works for me:

  1. Delete all .vssscc (solution binding) and .vspscc (project binding) files
  2. Remove block GlobalSection(TeamFoundationVersionControl) = preSolution from solution file

There could be also information regarding source control in the proj file in tags

<SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> <SccProvider>SAK</SccProvider>

SAK states for "Should Already Know", so it can be kept.


I found this tool that helped me get rid of a tfs binding complitly its found here https://marketplace.visualstudio.com/items?itemName=RonJacobs.CleanProject-CleansVisualStudioSolutionsForUploadi

it creates a zip with the removed source binding without modifying the orginal project.


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


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


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.