TFS TF237055: You cannot destroy a work item type that is being used.

Removing Existing Work Item Types

To remove an existing Work Item Type (WIT) you must modify the Category template to exclude the WIT in order to avoid receiving an error when attempting to delete.


Unable to destroy work item type Test Case

TF237055: You cannot destroy a work item type that is being used.

Verify that the work item type is not being used in any categories.

Operation failed.


Remove the WIT from the Categories XML file.

    1. Open the Visual Studio Command Prompt (2010) by browsing to the location below or set the environment via the command prompt by executing the Batch file (VS2010) :
      • “C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat” or Locating the VS Prompt on your Programs Menu
    2. Export the categories using the [witadmin] command:
      • witadmin exportcategories /collection:http://AdventureWorksServer:8080/tfs/defaultcollection /p:AdventureWorks /f:c:\mycategories.xml
    3. Open the exported categories XML from the location listed for /f: from above using notepad, remove the unwanted work item type by deleting the CATEGORY tag and it’s contents. Then save your changes.
  • <CATEGORY refname=”Microsoft.TestCaseCategory” name=”Test Case Category”><DEFAULTWORKITEMTYPE name=”Test Case” /></CATEGORY>

4. Import the modified category file using the import witadmin importimportcategories command.

      • witadmin importcategories /collection:http://AdventureWorksServer:8080/tfs/defaultcollection /p:AdventureWorks /f:c:\mycategories.xml


Deleting the unwanted work item type.

  1. Executed the witadmin destroywitd command to PERMANENTLY delete the work item type and ALL work items of that type. This command is NOT reversible once executed.
    • witadmin destroywitd /collection:http://AdventureWorksServer:8080/tfs/defaultcollection /p:AdventureWorks /n:Test Case
  2. Verify in Team Explorer that the work item type is no longer available.

For more information on managing Work Item types visit the MSDN Site.

Pin It

6 thoughts on “TFS TF237055: You cannot destroy a work item type that is being used.

  1. ShamsiyanAlbert June 11, 2013 at 3:26 am - Reply

    Hello David,
    It does not working … I have made all the procedure as explained and can still see the unwanted WIT definition in the list … When performing a new exportcategories, I get the new list…

    Any idea?

Leave a Reply

Your email address will not be published. Required fields are marked *