Solution to "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."

You’ll often see TF237055 when you try to call destroywitd on a type that is currently assigned to a category. Here’s how to get around that.

1
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.

You need to export your categories, remove the reference to that type and then import the updated categories.

1. Export the categories to a local file.

1
witadmin exportcategories /collection:[url] /p:"[project]" /f:C:\categories.xml

2. Remove the reference to the type in the categories file

(categories with Scenario type referenced – This is the type I was trying to remove)

(categories with the Scenario type removed – Just deleted that line, but your file may have other references to your type so make sure you remove all references)

3. Import the categories file back into TFS

1
witadmin importcategories /collection:[url] /p:"[project]" /f:C:\categories.xml

3. Rerun destroywitd

1
witadmin destroywitd /collection:[url] /p:"[project]" /n:"[type]"

Jon

Share