11
votes

Is there a command-line approach for having VS 2008 remove TFS source control bindings from a solution file and the constituent project files? I need something that I can run from a batch file so that I don't have to open the solution and click the 2 prompts to permanently remove the bindings.

Edit: After deleting the *.vspscc and *.vssscc files, the project and solution files still have references to TFS source control. So when the solution is opened, you are prompted to remove the solution from source control. This updates the solution and project files to remove the bindings, and that is what I want to automate.

3

3 Answers

0
votes

Try deleting the *.vspscc file.

0
votes

I would write a simple C# console app that would iterate through a directory, load any sln or proj files, and strip out the source control configuration. For TFS you should just need to edit the sln file, as I don't think I've seen any source control info stored in the actual projects.

The structure of the sln file is very simple to understand, I believe you just need to find the appropriate GlobalSection. Open the sln file in NotePad to find it.