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 tried deploying a Site Definition with a custom default.aspx page.

Within the <WebFeatures> node of the Site Definition's Onet.xml I tried to reference a Feature which would get a web part manager of the newly deployed default.aspx page.

This failed.

Why does the Feature Receiver of a dependant feature get called BEFORE modules are deployed from a Site Definition?

share|improve this question
I have edited your question for clarity, please can you check it. – Charles Lee Apr 26 '10 at 15:16
up vote 0 down vote accepted

Creating sites from Site Defs and using Feature Receivers to modify the provisioned files from the Site Def will not work. You have to pay attention to the order of the provisioning. The feature receiver is firing before the files from the site def is provisioned.

SharePoint MCM Mirjam van Olst have an excellent post explaining this:

share|improve this answer

Your Answer


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