One of the most used features in TFS Work Items are Global Lists. We use global lists very frequently because it save a lot of time in maintaining list data amongst different Team Projects.
What we also do very often is adding and removing items to and from a global list.
This article from Shai Raiten explains how to do this
Basically it comes to the point that you export the Global List XML, modify the XML and import it back.
However, deleting a Global List is not possible. Because the Import/Export methods are set up in a way that you can also add or update 1 list instead of everything, you can never delete a list. If you don’t send the XML of the particular list, it is not updated.
So what to do if you want to delete a Global List programmatically?
To delete all Global List you also need the WorkItemStore object. You can get this by getting the service from the TfsTeamProjectCollection object.
Then you need to create a special XML package that you can send to the SendUpdatePackge method of the WorkItemStore object.
This will do the trick. Your Global List will be deleted !
Happy Deleting !
(Thanks to Mark v/d Berg for this great tip !)