Plunging into .NET Development

Weblog Pieter Gheysens
Microsoft .NET Development - C# - Enterprise Library - Visual Studio 2005 Team System - Compuware DevPartner - ...

Thursday, May 8

#6 - delete vs destroy in TFS

Category : Administering Team Foundation Server Version Control

A delete operation in Team Foundation Server Version Control isn't a real delete. The item you've deleted is actually still there and kept in Version Control ...
  • I first created a new folder Pieter and checked in these changes

  • Then I deleted the folder and checked in these changes

  • At first sight, you might think that the folder is gone because you cannot see the folder anymore in Version Control.

  • Go to Tools > Options > Source Control > Visual Studio Team Foundation Server and check Show deleted items in the Source Control Explorer

  • Now you see that the folder is back, greyed out and marked with an x

In Team Foundation Server 2005 there's no option to destroy completely this folder. The information is kept forever in Version Control and you might even execute an undelete : right-click on the deleted folder and choose undelete!

In Team Foundation Server 2008 you now also have the option to destroy (a permanent delete action via the command-line) something forever - no undelete anymore possible afterwards. So, with TFS 2008, I tried it out and executed the command tf destroy $/VISUG/MainDev/Pieter ... but it returned me an error : the item does not exist on the server. Not true because I can still see it! What's happening?

The thing is that you need the deletion id of the item to force the destroy. How to get that deletion id? Request the properties of the appropriate item via the properties command. After that you will be able to pass the deletion id to the destroy command and the folder should be gone forever.




  • At 9:13 AM, Anonymous Anonymous said…

    How do you destroy an item when you are connected to two TFS servers. How is the item to be qualified to specify the server? Please see

  • At 9:21 AM, Blogger Pieter said…

    I believe that the destroy command for TFS will depend on your local workspace and to the TFS server that's coupled with that workspace.


Post a Comment

Links to this post:

Create a Link

<< Home