Welcome to part two of this short series on Solutions and Features in deployment scenarios. In part one we took a look at issues with deploying Site Columns using Solutions and Features and the pain points involved. We continue our exploration this time with...

Content Types

A Content Type can be deployed to a SharePoint installation using Solutions and Features by describing the Content Type in an XML file using the CAML syntax.

As with Site Columns the first deployment is usually very easy, and subsequent deployments can also be easy if you follow a few simple rules. These rules tend to be much the same as for Site Columns, do not modify your Content Type through the UI if you plan on trying to upgrade is later. Also, Content Types are duplicated as a List Content Type when they are associated ( it's really called Content Type Binding ) to a list or library.

There is a however a small ray of sunshine for Content Types in the form of an STSADM Extension called gl-propagatecontenttype. It is part of the STSADM Extensions from Gary Lapointe and are fast becoming my favorite SharePoint tool. 

image

The extension replicates the SharePoint UI to replicate changes to all List Content Types. Like Site Columns, using this causes your Content Type to become customized and it will no longer be updated via your feature.

The gl-propogatecontenttype extension will push the changes made to columns to the List Content Types that derive from it, but it does not cause the Content Type to be customized. This command will also help with Site Column woes as described in part one.

Next up ... Part 3 : Page Layouts.