title: Simple Injector GetAllInstances throwing exception with Caliburn Micro
body: <p>I have worked on Simple Injector and <a href="http://caliburnmicro.com/" rel="nofollow">Caliburn micro</a> but it's been a while almost 2 years. Now today when I tried to create a simple WPF application. First I end up reading the documentation as lot of changes has been done in both libraries. </p>
  
  <p>I ran into couple of issues like "view can not be found" that get resolved later on but now I'm stuck with an strange issue. Tried enabling logger and everything but don't know if it's problem of Caliburn micro or of simple injector.</p>
  
  <p>Here's my bootstrapper class:</p>
  
  <pre><code> internal class AppBootstrapper : BootstrapperBase
      {
          public static readonly Container ContainerInstance = new Container();
  
          public AppBootstrapper()
          {
              LogManager.GetLog = type =&gt; new DebugLogger(type);
              Initialize();
          }
  
          protected override void Configure()
          {
              ContainerInstance.Register&lt;IWindowManager, WindowManager&gt;();
              ContainerInstance.RegisterSingleton&lt;IEventAggregator, EventAggregator&gt;();
  
              ContainerInstance.Register&lt;MainWindowViewModel, MainWindowViewModel&gt;();
  
              ContainerInstance.Verify();
          }
  
          protected override void OnStartup(object sender, System.Windows.StartupEventArgs e)
          {
              DisplayRootViewFor&lt;MainWindowViewModel&gt;();
          }
  
          protected override IEnumerable&lt;object&gt; GetAllInstances(Type service)
          {
              // This line throwing is exception when running the application
              // Error: 
              // ---&gt; An exception of type 'SimpleInjector.ActivationException' occurred in SimpleInjector.dll
              // ---&gt; Additional information: No registration for type IEnumerable&lt;MainWindowView&gt; could be found. 
              // ---&gt; No registration for type IEnumerable&lt;MainWindowView&gt; could be found. 
              return ContainerInstance.GetAllInstances(service);
          }
  
          protected override object GetInstance(System.Type service, string key)
          {
              return ContainerInstance.GetInstance(service);
          }
  
          protected override IEnumerable&lt;Assembly&gt; SelectAssemblies()
          {
              return new[] {
                      Assembly.GetExecutingAssembly()
                  };
          }
  
          protected override void BuildUp(object instance)
          {
              var registration = ContainerInstance.GetRegistration(instance.GetType(), true);
              registration.Registration.InitializeInstance(instance);
          }
      }
  </code></pre>
  
  <p>Not sure what am I missing here?</p>