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.