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

So I have read all Chris OBrien Feature upgrading blogs and I have a big question.

Lets suppose that I want to create a site from scratch and I want to activate a feature that has a feature activated event and also a feature upgrading event.

Sharepoint will automatically execute both I suppose, or it will execute the feature activated only and then I will need to upgrade using the feature upgrade toolkit?

share|improve this question
up vote 4 down vote accepted

As Chris explains in Feature upgrade (part 1) - fundamentals

Feature upgrade does NOT happen automatically (including when the Feature is deactivated/reactivated)! The only way to upgrade a Feature is to call SPFeature.Upgrade()

So, on first deployment you'll activate the Feature and the Feature_Activated event will run.

Now you make some changes and you upgrade the solution using the Update-SPSolution cmdlet. The files in the package get deployed but the Feature version doesn't change, the Feature_Upgrade event handler doesn't run, and none of the upgrade instructions in the Feature manifest execute. To get these things to happen you need to write code or use PowerShell to call the Upgrade method of the SPFeature object. I generally create a custom application page that users can use to do this.

Check out Deep dive into feature versioning and upgrade support in SharePoint 2010 for more details.

share|improve this answer
Can you update the link you posted in this answer? It's 404'ing. Thanks for the very helpful answer! – iOnline247 Mar 10 '15 at 21:42
I've updated the link – Rob Windsor Mar 10 '15 at 21:45

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.