Bootstrapper.OnStartup never called, following the Basic Configuration example in WPF

Topics: Bootstrappers & IoC
Aug 28, 2014 at 8:47 PM
I already asked this question on StackOverflow.

I am trying to create a simple WPF application. However, I am keeping the views, models and bootstrapper in separate class library and calling it from a separate WPF application.

My library has just one view for main window, one MainWindow xaml class and a Bootstrapper derived class. Currently I have overloaded OnStartup

Here is my OnStartup code

protected override object GetInstance(Type serviceType, string key)
{
return base.GetInstance(serviceType, key);
}
Here is my WPF App.Xaml is calling it

<Application.Resources>
<ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <my:AppBootStrapper x:Key="bootstrapper" />
        </ResourceDictionary>
    </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Problem is, I noticed that Bootstrapper object is created but OnStartup is never called. Why ?

Do I have to do anything extra ?
Aug 29, 2014 at 5:21 AM
Found the issue, I was not calling Initialize() inside the ctor