How to make solution as clean copy without mapping to TFS ? The problem is that this message shows when I am trying to open it. I want to open it as normal without TFS connection.
7 Answers
To completely remove TFS source control binding follow these two steps:
- Go to your solution's folder, find and delete all files with
*.vssscc
and*.vspscc
extensions. - Open your solution's
.sln
file in Notepad, and find & remove theGlobalSection(TeamFoundationVersionControl)
section.
More details on reference Link

- 3,110
- 2
- 17
- 15
-
Solved it for me as well. I guess you can't fully extract TFS from within Visual Studio alone. – Rudy Scoggins May 19 '17 at 15:02
-
3This worked for me except the Team Foundation output still says, "The mappings for the solution could not be found. The mappings for the solution could not be found. The active solution has been temporarily disconnected from source control because the server is unavailable. To attempt to reconnect to source control, close and then re-open the solution when the server is available. If you want to connect this solution to another server, use the Change Source Control dialog." – EngineerWithJava54321 Jul 21 '17 at 14:59
-
3This worked for me. I followed the instructions on the "reference link". – Lei Shi Jun 08 '18 at 20:45
-
All the *.vs\* files means the solution _and_ projects folders. – ourmandave Dec 23 '19 at 13:36
-
First uncheck read only check box in the sln file properties, then do the rest. – Rezaeimh7 Mar 02 '21 at 11:33
-
This helped me, but I had to do a couple of extra things (not sure if it's a VS 2022 thing though): 1) Close the solution before running the above steps 2) make a copy of the workspace 3) remove the workspace from VS At that point the solution was no longer connected to TFS. Somehow the workspace was linked to TFS doing steps one and two only on this solution. – Zonus Jun 03 '22 at 17:08
-
I had a similar issue and it got resolved by removing the global section mentioned above from the .sln file. My doubt is, after removal of these lines can I commit the project back to the TFS server without adding back those lines ? – IT Researcher143 Dec 06 '22 at 04:45
If you want to permanently and completely detach the solution from source control, then try the following:
- Click the 'No' button to avoid connecting to TFS.
- In the file menu, go to the source control options and clear the bindings. You'll specifically want File - Source Control - Advanced - Change Source Control...
- Save the solution.
Next time you open the solution you won't be prompted to connect to TFS.

- 12,456
- 3
- 46
- 62
-
1In my case, it was necessary to use VS2013 to disassociate TFS from a VS2010 solution. – bvj Sep 01 '15 at 22:26
-
I had to re-enable Javascript (turned off for testing) in Chrome to have this option display. To be fair MSVC did mention flash a warning message on the TFS log on screen. – Anthony Mar 07 '16 at 21:57
-
This doesn't properly work because it does not remove the bindings files, making it hard to reconnect to source control later. – Lukos Sep 16 '16 at 09:24
-
In my case, the "Disconnect" button is disabled, for two entries. – B. Clay Shannon-B. Crow Raven Dec 07 '16 at 21:23
-
A point to add is that you need to select the solution in solution explorer for the option of Change Source Control to be enabled – Arnab May 20 '17 at 06:20
-
3In VS2017 this has no effect, the next time you open the solution you will again have to choose 'don't contact tfs' and 'ok' to the error message that follows. – Gerard Jan 26 '18 at 13:48
-
-
See Tabish's and cpz77's answers below. The combination of these two worked for me in VS 2017. – Tim Aug 07 '18 at 13:36
Edit the solution file and remove the following section from it. It won't be the same but will be similar.
Note:To edit the solution file go to the project folder then open the YouSolutionName.sln
file with notepad.
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = <YourTFSURL>
SccLocalPath0 = .
SccProjectUniqueName1 = .
SccLocalPath1 = .
EndGlobalSection

- 4,885
- 2
- 33
- 39

- 4,486
- 3
- 32
- 41
I don't have enough reputation to comment, but just wanted to add that Tabish's solution does in fact work correctly to completely remove the solution from source control, especially when the TFS server is not reachable for one reason or another (e.g. you downloaded a project that the author did not remove from their own source control before uploading).
However, to completely remove all traces of source control from the project and avoid the warnings that are noted in the other comments to that answer (e.g. "The mappings for the solution could not be found..."), you must also remove the following lines from every project file in the solution (apparently these used to be in the solution file in earlier versions of VS, but in VS2017 they are found in the project file for each project in the solution - e.g. [project].csproj):
SccProjectName = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
SccAuxPath = "x"
SccLocalPath = "xxx"
SccProvider = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Thanks to the marked answer and other comments here for pointing this out:
visual source safe - how to remove bindings from solution w/o opening in visual studio
Combining this with Tabish's answer seems to be the most complete method of manually removing a solution from source control.

- 413
- 3
- 7
To remove the binding you can use Visual Studio : Menu File / Source Control / Advanced / Change Source Control.
You can also do it yourself by removing any SCC... from sln and csproj.
If you often export source files, you can use ExportSrc. It has many options such as remove TFS binding (ON by default).

- 20,589
- 7
- 64
- 83
Most of the answers provided a solution, but I would rather use a solution provided by Visual Studio 2017.
On the Menu bar of Visual Studio, go to Team and select Disconnect from Team Foundation Server. That's it.

- 2,567
- 1
- 18
- 16
I just inherited a collection of TeamFoundation projects following an M&A buyout and tech transfer. There were like 30+ solutions and a buttload of *.vssscc and *.vspscc files.
Based on everyone's input above, I wrote a PowerShell function to recurse a specified root folder, delete the files, then edit the solution files to remove the TeamFoundationVersionControl section.
Usage is Remove_TFSfiles "pathname" $booleanflag
.
To see what files would be affected, use $false
(uses -whatif):
Remove_TFSfiles "C:\MyDevFolder" $false
To actually delete those files, use $true
:
Remove_TFSfiles "C:\MyDevFolder" $true
Here's the function:
Function Remove_TFSfiles {
param(
[string]$FolderName = $(throw "-FolderName is required."),
[bool]$RemoveFiles = $(throw "-RemoveFiles (either $true or $false) is required.")
)
$TFSExtensions = '*.vspscc', '*.vssscc'
if ($RemoveFiles) {
Get-ChildItem -path $FolderName -force -include $TFSExtensions -Recurse | Remove-Item -Force
# Now iterate through any solution files, and whack the TeamFoundationVersionControl section
Get-ChildItem -Path $FolderName -Filter "*.sln" -Recurse | ForEach-Object {
$slnFilename = $_.Fullname
Write-Host -NoNewline "Editing $slnFilename... "
$File = Get-Content $slnFilename -raw
$Filestr = [regex]::escape("" + $File + "")
# The regex escapes must themselves be meta-escaped, therefore "\(" becomes "\\" + "\(" = "\\\(". Did I mention I hate regex?
$Result = $Filestr -replace "\\tGlobalSection\\\(TeamFoundationVersionControl\\\).*?EndGlobalSection\\r\\n", ""
$result = [regex]::unescape($result)
Set-ItemProperty $slnFilename IsReadOnly $false
$result | Set-Content $slnFilename
Write-Host "Done"
}
Write-Host -f red "Finished actually removing files and editing *.sln files"
}
else {
Get-ChildItem -path $FolderName -force -include $TFSExtensions -Recurse | Remove-Item -WhatIf
Write-Host -f green "Finished pretending to remove files"
# Now iterate through any solution files, and whack the TeamFoundationVersionControl section
Get-ChildItem -Path $FolderName -Filter "*.sln" -Recurse | ForEach-Object {
$slnFilename = $_.Fullname
Write-Host "Not Editing $slnFilename"
}
}
}

- 1
- 1

- 758
- 7
- 13
-
-
1Thank you! This was exactly what I hoped to find! And this is still relevant - in my case because of BizTalk 2016 which requires VS2015 so teams haven't bothered to change source control for the codebase. [This is a great whatif implementation article](https://jeffbrown.tech/using-powershell-whatif-so-you-dont-break-stuff/) if you want to implement whatif in the standard way in your own scripts. The nice thing is the whatif flag passes automatically to under commands (or maybe there was a reason your variant was better in this case!). – housten Mar 08 '23 at 10:04