Sharepoint - Best practice for deploying Site Columns and Content Type

Solution Packages - whether Farm or Sandbox - are still the way to go for deploying site columns and Content Types. With an "app", you can only deploy these artifacts to the app itself, not to the host SharePoint site (and I'm a little peeved with Microsoft for not making it more clear what you can and can't do in an app).

And yes, Sandbox solutions are deprecated technically in 2013, but they are not going anywhere, and they are still the only way to deploy code to SharePoint Online.

As far as your automated build is concerned, you should be able to accomplish what you are trying. One thing you should keep in mind though is that redeploying to UAT will necessitate deleting and re-creating your lists and libraries (and associated data).


From SP2010 and forward we have not used solutions / features for this. Instead we use PowerShell to do this programmatically using server side API's.

By doing this we avoid "unghosting" the content types (as doing it declaratively does) and we also avoid having to deploy a package which include resetting IIS.

In SP2013 we continue doing this, but since we want to do this for our cloud solutions as well as on-premises solutions, we have converted our scripts to ClientSide Object Model (CSOM).

The one disadvantage of doing this is, that Microsoft unfortunately haven't supplied us with the possibility of deciding the Content Type ID as we can server side. This makes provisioning across platforms harder since we dont know the ID. It can be circumvented somewhat -for example in search you can use the CT name instead of the ID in queries.

Tags:

Content Type