ModuleTypeLoaderNotFoundException There is currently no moduleTypeLoader in the ModuleManager that can retrieve the specified module. ..?

Topics: Prism v4 - WPF 4
Jun 1, 2012 at 10:41 AM

I'm trying to load a catalog from XAML in WPF.  I've done this successfully in Silverlight (mainly because the example's in the ref docs were for Silverlight) however when I try to do the equivalent in WPF I get the following error when the Boostrapper trys to load a module from the XAML derived catalog:

There is currently no moduleTypeLoader in the ModuleManager that can retrieve the specified module.


Here's what I have for the catalog (Catalog.xaml):  


        ModuleType="MyNamespace.MyModule, MyNamespace" />


It's loading OK from here (in the Bootstrapper):


        protected override IModuleCatalog GetModuleCatalog()
            var uri = new Uri("/Catalogs/Catalog.xaml", UriKind.Relative);
            var catalog = ModuleCatalog.CreateFromXaml(uri);
            return catalog;

A breakpoint shows that the catalog is actually loaded, and contains one item.  The exception is thrown from within 
    public partial class App : Application
        protected override void OnStartup(StartupEventArgs e)
            new Bootstrapper().Run(); // Exception thrown from here.



Can anyone help me with this issue? i have tried hard but could not find any solution? Please let me know how to go about this problem?



Jun 1, 2012 at 1:37 PM


Based on my understanding, this error could be related to the fact that the Ref attribute in your ModuleInfo does not start with file://.

You could find more information about this in this related thread:

Also, if you are using MEF you should be aware of the following known issue:

There, you could also find a small working sample.

I hope you find this handy,

Agustin Adami

Jun 6, 2012 at 8:02 AM

H! Agustin


Thanks for your reply.!

i tried with your solution by usinf file:// on ref in modulecatalog.xaml   but it did not work for me.

Could you provide me any alternate solution to above problem?

I am still in debug mode , my application is still getting the same exception.


if you or anyone else has any other solution please reply 

Its urgent


Thank you



Jun 6, 2012 at 8:14 AM

Hey H!


It worked when i commented other two ModulesInfo in Modulecatalog.xaml 


<prism:ModuleCatalog xmlns=""
    <!--<prism:ModuleInfo InitializationMode="WhenAvailable"
                      ModuleType="MenuModule.ModuleInit, MenuModule, Version=, Culture=neutral, PublicKeyToken=null"
                      Ref=" file://MenuModule.dll"/>-->
    <prism:ModuleInfo InitializationMode="WhenAvailable"
                      ModuleType="OrgManager.ModuleInit, OrgManager, Version=, Culture=neutral, PublicKeyToken=null"
                      Ref=" file://OrgManager.dll"/>
   <!--<prism:ModuleInfo InitializationMode="OnDemand"
                      ModuleType="CodeManager.ModuleInit, CodeManager, Version=, Culture=neutral, PublicKeyToken=null"
                      Ref=" file://CodeManager.dll"/>-->

See if i comment other two modules , it loads me OrgManger the second module from above. but if i uncomment all and than run the application
than it gives me that ModuletypeLaoder error. Can you find any resion for it? why its behaving in such fashion.

I am only loading OrgManger module.
Please reply 

Jun 6, 2012 at 3:59 PM


Beside the aforementioned problems, I have used ModuleCatalog to load modules in WPF with MEF and Unity (similar to the sample provided in the second link i mentioned above).

One thing I noticed in the code snippets you provided, is that in your Bootstrapper, you are overriding the GetModuleCatalog method, take into account that since Prism 4.0 the GetModuleCatalog method in the Bootstrapper is now called CreateModuleCatalog. Hence, you could change it, for example like in the following code snippet:

protected override IModuleCatalog CreateModuleCatalog()
            var uri = new Uri("/Catalogs/Catalog.xaml", UriKind.Relative);
            var catalog = ModuleCatalog.CreateFromXaml(uri);
            return catalog;

Also, it could be helpful to mention that in order for relative paths to work, you need to place your module's DLL in the same folder as your shell project.

Also, it would be helpful if you could you provide us with more information about your scenario, like the full exception message text as there may be a couple of thing that could be causing your problem, or if you continue experiencing it, perhaps you could provide us with a repro sample application, so that we can help you further with this.

Also, you could try using another mechanism to register your modules like Using a Configuration File, to see if your modules are correctly loaded.


Agustin Adami