Caliburn.Micro DisplayRootViewFor throws NullReferenceException
<p>I have the following code in my Bootstrapper:</p>

<pre><code>private SimpleContainer container;

protected override void Configure()
{
  container = new SimpleContainer();
  container.Singleton&lt;IEventAggregator, EventAggregator&gt;();
  container.PerRequest&lt;InitialViewModel&gt;();  
}

protected override object GetInstance(Type service, string key)
{
  return container.GetInstance(service, key);
}

protected override IEnumerable&lt;object&gt; GetAllInstances(Type service)
{
  return container.GetAllInstances(service);
}

protected override void BuildUp(object instance)
{
  container.BuildUp(instance);
}
</code></pre>

<p>In the OnStartup method, I call the <code>DisplayRooViewFor</code> method:</p>

<pre><code>protected override void OnStartup(object sender, StartupEventArgs e)
{ 
  DisplayRootViewFor&lt;InitialViewModel&gt;();
}
</code></pre>

<p>This is the InitialViewModel:</p>

<pre><code>    private IEventAggregator eventAggregator;    

    public InitialViewModel(IEventAggregator ea) 
    {
      eventAggregator = ea;
    }
</code></pre>

<p>Unfortunately, it throws a <em>NullReferenceException</em>:</p>

<blockquote>
  <p>An exception of type 'System.NullReferenceException' occurred in
  Caliburn.Micro.Platform.dll but was not handled in user code</p>
</blockquote>

<p>I checked the source code of CM and used the same code to test it:</p>

<pre><code>  protected override void OnStartup(object sender, StartupEventArgs e)
    {
      var viewModel = IoC.GetInstance(typeof(InitialViewModel), null);
      var view = ViewLocator.LocateForModel(viewModel, null, null);
      ViewModelBinder.Bind(viewModel, view, null);

      var activator = viewModel as IActivate;
      if (activator != null)
        activator.Activate();

      DisplayRootViewFor&lt;InitialViewModel&gt;();
    }
</code></pre>

<p>Strangely, there was no Exception at those lines. Both <em>view</em> and <em>viewmodel</em> have reference, and the constructor of <em>InitialView</em> gets called, but when it reaches and calls <code>DisplayRootViewFor</code>, it still throws an exception.</p>

<p>What should I change?</p>