Bootstrapper initialization is not at the Application Startup event in some of the Quickstarts and Documentation topics

Problem

Running the Bootstrapper at the App’s constructor stage will probably let your application in an inconsistent state, for example if you try adding application resources dynamically.

Solution

It is recommended that the Bootstrapper initialization be placed in the handler for the Startup event of the Application like in the following sample code:
public partial class App : Application
{
    protected override void OnStartup(StartupEventArgs e)
    {
        base.OnStartup(e);

        MyBootstrapper bootstrapper = new MyBootstrapper();
        bootstrapper.Run();
    }
} 

Assets affected

In the first release of Composite Application Guidance, the following assets are running the Bootstrapper from the App constructor instead of the Startup event (these are not correct):

More Information

You may find information on the application’s startup in the Remarks section of these links:

Last edited Oct 3, 2008 at 5:35 PM by mconverti, version 3

Comments

GuidoMaliandi Apr 6, 2011 at 4:44 PM 
It could be useful to know that, as of Prism v4, all the pertinent QuickStarts, Reference Implementations and documentation have been updated to fix this issue.

Thanks,

Guido Leandro Maliandi
http://blogs.southworks.net/gmaliandi