July 13, 2013

How to: Delete a TFS Team Project

I have a lot of Team Projects at http://tfs.visualstudio.com/ - but sometimes I use a name which I later regret. Fortunately you can delete a Team Project using the "TFSDeleteProject.exe" command line tool, which is usually located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE. 
Just open a Command Prompt in that folder (or a Developer Command Prompt for Visual Studio) and run the delete command:
TFSDeleteProject.exe /force /collection:https://<YourCollection>.VisualStudio.com/DefaultCollection "Project name"
NOTE: The /FORCE switch is optional, but if you received errors creating a team project or had troubles accessing it after creation and want to force it's deletion, the /FORCE switch may be necessary. It doesn't hurt to use it all the time.