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‚Äú).¬†
Looking for training for Team Foundation Server and Visual Studio Team System?¬† Contact us via http://www.benday.com.