views:

8234

answers:

4

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.

A: 

Try deleting the *.vspscc file.

Micah
That's a start, but source bidings are also stored in the project file, so simply deleting the vspscc file won't take care of it.
ahockley
A: 

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.

tbreffni
I've just removed TFS binding for BlogEngine.NET and it is just one GlobalSection in the sln file.
Tim Murphy
A: 

I use this custom task and it works very well.

http://www.wintellect.com/cs/blogs/jrobbins/archive/2006/12/26/working-offline-with-tfs.aspx

you can remove/restore TFS Binding.

Jirapong