Azure DevOps, Scrum, & .NET Software Leadership and Consulting Services

Free course! Predicting the Future, Estimating, and Running Your Projects with Flow Metrics

Intellisense For Team Server Work Item Template Schemas


In Team Foundation Server (TFS), you’re allowed — encouraged — to customize your work item definitions (take a look at witimport.exe and witexport.exe).  There are some 3rd party tools out there that give you a GUI for editing the templates but I think the best way to learn how it actually works is to edit it by hand. 

The problem is there aren’t any published XML schemas to either validate your work or to do Intellisense through Visual Studio.  What if you want to validate your template and see if you’re doing it correctly?  Well, you need to call “witimport.exe /v”.   It’s kind of a pain.

This got me thinking…TFS is clearly validating these things either on the client or on the server.  So, how does TFS do the validation?  It’s either with an XSD or (uhhgh) it programatically validates the XML. 

A little hunting around with Reflector and I found what I was looking for.  There are three XSD’s hanging off of Microsoft.TeamFoundation.WorkItemTracking.Client.Provision.dll: WorkItemTypeDefinition.xsd, typelib.xsd, and globallists.xsd

From Reflector, I did a “Save As…” and put these XSDs in the Visual Studio schema’s folder (”C:Program FilesMicrosoft Visual Studio 8XmlSchemas”) and VOILA!  Intellisense on work item definitions.

Update (8/6/2006): This only appears to work for work items that are exported using witexport.exe.  Work items exported to file using the Process Template Editor have a slightly different root xml element (“WITD“ instead of witexport’s “witd:WITD“). 

-Ben

Looking for training for Team Foundation Server and Visual Studio Team System?  Contact us via http://www.benday.com.

SUBSCRIBE TO THE BLOG


Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.