There’s a nice little utility out there for Team System.  It allows you to delete a team project.  You know, those Foo1 and MyTest projects you create right away?  Right!  Well, there’s no way in VSTS to delete those, so someone at MS gave us a wonderful little utility, DeleteTeamProject.exe.  UPDATE:  Except I can’t get it to work.  It deletes everything useful, but you can’t get rid of it from the Team Explorer.  ๐Ÿ™

(BUT BE CAREFUL!  It isn’t part of VSTS, it’s just a utility someone threw together for the Beta.  There is no error checking, and it fails unless everything is JUST RIGHT, and once it fails your TFS is completely corrupted, but you can then run with the /force attribute.)

Bottom Line Up Front – here’2013-08-28 13:51:18’s how you use it:  DeleteTeamProject /domain:{MyTFSServerName} “My Team Project”

Pretty easy to use, but there are some gotchas!

First, it’s located in a pretty remote directory: C:Program FilesMicrosoft Visual Studio 8Common7IDEPrivateAssemblies (assuming you’re on drive C:)

Second, here are the parameters you can pass it.  /q and /domain and /force, as well as the project name.   /q just schwacks the project without asking for user confirmation, and /domain refers to the name of the TFS server.  ๐Ÿ™‚  Yes, you read that right!  That took a while to figure out.  /force continues deleting pieces even if one fails (useful if you only get 1/2 way through).

Buck Hodges has a post that talks about using it in the Dec CTP, but some stuff has changed, I think.  I tried leaving /domain off (since it wasn’t required if you’re only on one domain, but that didn’t work.  I’m on a VPC domain, which is on top of another domain, so that could be why).  I tried /domain:MyDomain and that didn’t work, neither did /domain:MyDomainMyServer, but /domain:MyServerName worked!

Happy Deleting!  Oh, one more gotcha!  You’d better have your ducks in a row, and all your source code checked in, since it deletes stuff out of the TFS databases WITHOUT USING A TRANSACTION.  So if you have just one little file checked out somewhere on your whole dev team, it will fail 1/2 way through.  You can use the /force attribute to ignore the errors in the deletions and continue deleting pieces that weren’t deleted yet.  But you can’t change your mind and go back.

I hope I didn’t scare you away.  When you need it, you need it!  Just take all necessary precautions, and then some.  Maybe this feature will be added in the final release.