I have created a site definition in which I have a series of web scoped features getting activated.

Some of the features are meant to set targetting audiences on webparts, some of them are creating lists to be shown in webparts etc.

What I want to know is; In what order does the site definition create pages, subsites, activate features, run timerjobs etc and what is best practice to ensure the entire workflow runs correctly?

1 Answer 1


SharePoint MCM Mirjam van Olst has written everything about the provisioning order: http://sharepointchick.com/archive/0001/01/01/site-definition-provisioning-order.aspx

Bottom line is that building pages with web parts using Site Definitions is very complex, and often leads to bad solution designs. I would suggest that you look into using WebTemplates instead: http://blogs.msdn.com/b/vesku/archive/2010/10/14/sharepoint-2010-and-web-templates.aspx

  • Thank you for the links. Another thing I'm interested in knowing then, is when I'm attaching a SPWebProvisionProvider to the site template, does the code in this provider then run before, alongside or after the site definition provisioning?
    – user2536
    Aug 8, 2011 at 12:18
  • With a provsioning provider, you'll basically do it all manually... Aug 8, 2011 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.