title: 'Prism.Modularity.ModuleTypeLoadingException' in Prism.Wpf.dll is thrown when Prism 6 WPF application is starting
body: <p>When my Prism 6 WPF modular application using Unity is starting then "Prism.Modularity.ModuleTypeLoadingException" in Prism.Wpf.dll is thrown.  Below is screen shot of the exception:</p>
  
  <p><a href="https://i.stack.imgur.com/vqxP1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vqxP1.png" alt="enter image description here"></a></p>
  
  <p>As you can see the exception throws when Bootstrepper.Run method is called. Below is the code of the Botstrapper:</p>
  
  <pre><code>namespace FlowmeterConfigurator
  {
      class Bootstrapper : UnityBootstrapper
      {
          protected override DependencyObject CreateShell()
          {
              return Container.Resolve&lt;MainWindow&gt;();
          }
  
          protected override void InitializeShell()
          {
              Application.Current.MainWindow.Show();
          }
  
          protected override IModuleCatalog CreateModuleCatalog()
          {
              return new ConfigurationModuleCatalog();
          }
      }
  }
  </code></pre>
  
  <p>Solution of my application consists of three projects: main WPF project created with Prism Template Pack as Prism Unity App and two modules, each of which is created with Prism Template Pack as Prism Module. Both of the modules are registered in App.config file, please see below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
     &lt;configuration&gt;
        &lt;configSections&gt;
            &lt;section name="modules" type="Prism.Modularity.ModulesConfigurationSection, Prism.Wpf"/&gt;
        &lt;/configSections&gt;
        &lt;modules&gt;
            &lt;module assemblyFile="Authorization.dll" moduleType="Authorization.AuthorizationModule, Authorization, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="AuthorizationModule" startupLoaded="true" /&gt;
            &lt;module assemblyFile="Calibration.dll" moduleType="Calibration.CalibrationModule, Calibration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" moduleName="CalibrationModule" startupLoaded="true" /&gt;
        &lt;/modules&gt;
        &lt;startup&gt;
            &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /&gt;
        &lt;/startup&gt;
     &lt;/configuration&gt;
  </code></pre>
  
  <p>The first module is called Authorization and its class is caled AuthorizationModule:</p>
  
  <pre><code>namespace Authorization
  {
      [Module(ModuleName = "AuthorizationModule", OnDemand = false)]
      public class AuthorizationModule : IModule
      {
         . . . . .
      }
  } 
  </code></pre>
  
  <p>The second module is called Calibration and its class is called CalibrationModule:</p>
  
  <pre><code>namespace Calibration
  {
      [Module(ModuleName = "CalibrationModule", OnDemand = false)]
      public class CalibrationModule : IModule
      {
         . . . . .
      }
  }
  </code></pre>
  
  <p>When my application is starting then MainWindow is displayed for short time (less then 1 second) and after this short time interval ModuleTypeLoadingException related to CalibrationModule is thrown. It looks like that type for AuthorizationModule was loaded succsessfully but loading of type for CalibrationModule fails. Please help me to eliminate this error.</p>
  
  <p>P.S. I've not defined any instance of IModuleManager in my application. May be I must define it somewhere in my application?</p>