views:

128

answers:

1

I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some page-templates, some site columns (grouped to match each page-template) and som custom list templates etc. I have also created a site collection, some sites and pages based on my feature.

Now I have upgraded the code in my feature - I wanted a ListInstance to be created based on my custom list template. When I have upgraded my SharePoint (using WSPBuilder), the ListInstance and default data are visible if I create a new site collection, but existing site collection does not get the ListInstance and data. Is there anything I can do to update existing site collections to contain the ListInstance when upgrading?

A: 

Unfortunately your only choice here is to programmatically create the list in all existing sites in the feature's FeatureActivated method in a feature event receiver. This is a gaping hole in sharepoint's deployment model, and a painful one at that.

-Oisin

x0n
I have two questions to this solutions; 1) will this mean, that I have to manually deactivate and active my feature on all site collections in order to call FeatureActivated? 2) FeatureActivated is called when I create a new site collection so if I create my ListInstance in FeatureActivated I guess this will conflict with the ListInstance I am creating at the moment using features.xml?
keysersoze