1

I successfully upgraded one feature in my existing sharepoint 2010 site collection(A) . Previous version was 0.0.0.0 and I upgraded it to 1.0.0.0. After upgrading I created one more site collection(B) and activated the same feature. To my surprise site collection(B) does not contain any changes that I applied to site collection(A). I ran following powershell script to check the version of feature on both site collection and it results 1.0.0.0 for both.

(get-spsite http://mysiteurl/sites/scb).QueryFeatures((New-Object System.Guid("--feature guid--")), $true) | Select Definition, Version

Now I can't upgrade my feature in site collection(B) because upgrade system will not work because version is 1.0.0.0. Is there a way to upgrade features in new site collection that are created after feature upgrade?

Navneet
  • 151
  • 2
  • 7

1 Answers1

0

What changed between version 0.0.0.0 and 1.0.0.0? Without more information, it sounds like you are expecting code within FeatureUpgrading to be run when the feature is activated on a new site collection. It will not. In order to execute the same code when the feature is activated, you also put the code in the FeatureActivated method.

Rich Bennema
  • 10,295
  • 4
  • 37
  • 58