Wednesday, August 26, 2009

Using Andrew Connell's stsadm commands to make Content Type and Site Column features

When using Andrew Connell's custom stsadm commands, I've found that you need to do the following to make a working Site Column and Content Type feature:

For Site Columns, run the GenSiteColumnsXml command (using groupFilter helps get your custom ones), and then in the resulting xml, remove any columns that have the "Version" attribute. Then create your feature.xml:








and then put your site columns into your elements.xml:







For Content Types, do the same thing, only after pasting in from the GenContentTypesXml command, remove XmlDocuments Node from each ContentType:




ListForm
ListForm
ListForm




That should do the trick!