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:
ModuleTypeLoaderNotFoundException
There is currently no moduleTypeLoader in the ModuleManager that can retrieve the specified module.
Here's what I have for the catalog (Catalog.xaml):
<Modularity:ModuleCatalog
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:Modularity="clr-namespace:Microsoft.Practices.Composite.Modularity;assembly=Microsoft.Practices.Composite">
<Modularity:ModuleInfo
Ref="Modules/MyAssembly.dll"
ModuleName="ShellModule"
ModuleType="MyNamespace.MyModule, MyNamespace" />
</Modularity:ModuleCatalog>
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?
Thanks
VJ