I often have the need to distribute Visual Studio source code to external parties. Internally this source code is under source control in Team Foundation Server (TFS).
It would be nice if you could just take a copy of the source files and remove the source control binding (in Visual Studio). Unfortunately I haven’t found a way to be able to do this. Even when Visual Studio says that all bindings have been removed, if you try to open up the solution you get an error message along the lines “The solution you are opening is bound to source control on the following Team Foundation Server …”
Under earlier versions of Visual Studio I had used Visual Source Safe for source control and had used a utility called VSSBindingRemover which did the job quite effectively. It removed all source control files with the solution and project directories and modified the solution and project files themselves to remove source binding information.
My search for a similar tool for Visual Studio 2012 / TFS resulted in a utility available on CodePlex called VSUnbindSourceControl. Update: this project has now been moved to GitHub
The process for removing bindings is simple:
- Ensure you don’t have the solution/projects open in Visual Studio
- Copy your solution to a new directory (because the tool does modify files)
- Run the utility from the command line: VSUnbindSourceControl.exe d:\mysolution folder
Once the tool is finished, all the source control bindings have been removed from any solution and project files.
Thanks for this. Wish I had found this earlier.
LikeLike
Utility was buggy for me, other people say same on comments. I succeeded by removing the TFS Source Control specific files, e.g. *.vsccc (or whatever they are) and then removing the following section from each project file:
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27XXXXX}
SccTeamFoundationServer = https://xxx.xxx.com/defaultcollection
SccLocalPath0 = .
SccProjectUniqueName1 = CrossXXXX\\CrossXXXX.dtproj
SccProjectName1 = CrossXXXX
SccLocalPath1 = CrossXXXX
EndGlobalSection
LikeLiked by 2 people
ha whooops that was dumb! Please reject or remove the tfs/project identifying info from my previous comment before approving. Thanks. Doh!
LikeLike
Thanks! This saved me some time and frustration with one of the projects.
LikeLike
This worked wonderfully. Thank-you.
LikeLike
You’re welcome, glad it helped.
LikeLike
Thanks for sharing the information. its useful.
also to Completely remove TFS(Team Foundation Server) source control binding you can visit following link
LikeLike
How can I do this for websites under TFS?
LikeLike