I was working on a client’s computer yesterday to make some Process Template changes on TFS 2013. I fired up a command prompt, typed witadmin /? to see if it was on the path an off I went.
I exported a Work Item definition (witadmin exportwitd), added a field and tried to import the changes (witadmin importwitd). I then received a couple of schema validation errors along the lines of:
TF212019: Work item tracking schema validation error at row x, column y: The HideControlBorders attribute is not declared.
TF212019: Work item tracking schema validation error at row x, column y: The HideReadOnlyEmptyFields attribute is not declared.
I checked my changes, and checked that the attributes were present.
<Layout HideControlBorders="true" HideReadOnlyEmptyFields="true">
It wasn’t one I’d seen before, the changes imported correctly on my own VM and there were no hits on a quick web search (hence I’m writing this blog!)
I know those attributes were added in TFS 2012 and that should have given me a clue as to what was causing the problem but instead I wasted time investigating other causes.
It wasn’t until I made a change to the categories.xml that it became obvious. Again, export was fine but an import gave a more useful error message about my version of witadmin.
Doh! I quickly checked and the client had both VS2013 and VS2010 installed so the wrong version of witadmin.exe was on his path. It wasn’t my machine to mess with so I just did a quick cd to:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE
I hit the same witadmin importwitd and everything was fine.