title: How do I Configure the Module Catalog in Prism using DryIoc instead of Unity?
body: <p>I'm working with the Prism Library WPF Samples <strong><a href="https://github.com/PrismLibrary/Prism-Samples-Wpf" rel="nofollow noreferrer">here</a></strong> (specifically, <strong><a href="https://github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/21-PassingParameters" rel="nofollow noreferrer">this one</a></strong>).</p>
  
  <p>I'm trying to convert the sample's bootstrapper from using the <em>Unity</em> container to <em>DryIoc</em>.  The original code looks like this:</p>
  
  <pre><code>class Bootstrapper : UnityBootstrapper
  {
      protected override DependencyObject CreateShell()
      {
          return Container.Resolve&lt;MainWindow&gt;();
      }
  
      protected override void InitializeShell()
      {
          Application.Current.MainWindow.Show();
      }
  
      protected override void ConfigureModuleCatalog()
      {
          var catalog = (ModuleCatalog)ModuleCatalog;
          catalog.AddModule(typeof(ModuleAModule));
      }
  }
  </code></pre>
  
  <p>My new code looks like this:</p>
  
  <pre><code>class Bootstrapper : DryIocBootstrapper
  {
      protected override DependencyObject CreateShell()
      {
          return Container.Resolve(typeof(MainWindow), true) as DependencyObject;
      }
  
      protected override void InitializeShell()
      {
          Application.Current.MainWindow.Show();
      }
  
      protected override void ConfigureModuleCatalog()
      {
          var catalog = (ModuleCatalog)ModuleCatalog;
          catalog.AddModule(typeof(ModuleAModule));
      }
  }
  </code></pre>
  
  <p>But when I try to run the new code, I get the following exception:</p>
  
  <p><a href="https://i.stack.imgur.com/GlLOb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GlLOb.png" alt="enter image description here"></a></p>
  
  <p>The Inner Exception says:</p>
  
  <pre><code>Activation error occurred while trying to get instance of type ModuleAModule, key ""
  </code></pre>
  
  <p>And the Inner Exception of that Exception says:</p>
  
  <pre><code>Unable to get constructor of DryIoc.Rules using provided constructor selector when resolving DryIoc.Rules {ReturnDefault} as parameter "rules"
    in DryIoc.Container as parameter "container"
    in ModuleA.ModuleAModule.
  </code></pre>
  
  <p>Code for ModuleAModule:</p>
  
  <pre><code>public class ModuleAModule : IModule
  {
      IRegionManager _regionManager;
      Container _container;
  
      public ModuleAModule(RegionManager regionManager, Container container)
      {
          _regionManager = regionManager;
          _container = container;
      }
  
      public void Initialize()
      {
          _regionManager.RegisterViewWithRegion("ContentRegion", typeof(PersonList));
  
          _container.RegisterTypeForNavigation&lt;PersonDetail&gt;();
      }
  }
  </code></pre>