SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a feature that has been upgraded a couple of times to add new fields to a content type. The feature started as version and was deployed and activated at the site collection level.

As part of ongoing maintenance, we upgraded the feature to to add some fields to a content type, and again later to to add fields to another content type. Each time, after running Update-SPSolution on the containing WSP, I used Chris O'Brien's Feature Upgrade Kit to query for features at a certain scope that require an upgrade, and then upgrade the feature.

Worked like a charm ...

The problem I'm having is that when I create a new site collection from scratch, none of the historical upgrade actions I made to that feature are being applied.

I understand that Feature upgrades are decoupled from solution deployment and updates, however, when I check with the Feature Upgrade Kit, it tells me that no feature instances at the scope require an upgrade. Also, I can see (in SharePoint Manager) that the feature version is actually

Here's what the Upgrade Actions look like:

  <VersionRange BeginVersion="" EndVersion="">
    <AddContentTypeField ... />
    <AddContentTypeField ... />
  <VersionRange BeginVersion="" EndVersion="">
    <AddContentTypeField ... />
    <AddContentTypeField ... />

Things I've tried:

  • Set BeginVersion to on each VersionRange
  • Omit BeginVersion on each VersionRange
  • Run Update-SPSolution post deployment and query for features requiring an upgrade

Not sure what I'm missing here.


share|improve this question
up vote 3 down vote accepted

My understanding is that when you add a new field to Content Type while upgrading a FEATURE, you have to :

  1. Use your code (UpgradeActions/VersionRange in your question) for FEATURES already activated and need to be upgraded

  2. Add the fields to the original content types also to make sure that fresh activation also includes the fields because, it (fresh activation) will NOT go through the upgrade cycle.

share|improve this answer
Thanks Ashish, that makes perfect sense. – George Durzi Jan 24 '12 at 19:59

The point here is that there are many possible upgrade scenarios, and in some cases performing historical upgrades is not desired. Instead of managing only upgrade actions, you should also keep up-to-date the main version of your feature, i.e. you should include the FieldRef elements into the content type XML. This will not interfere with UpgradeActions, because if you're activating the feature from scratch, it is intended to be the latest version.

share|improve this answer
Thanks omlin, it makes sense that things would work that way. – George Durzi Jan 24 '12 at 20:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.