Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Module OnDemand=true doesn't work

$
0
0
Hi,

It seems that the ModuleHouseOwnerInfo module is not being registered in the ModuleCatalog. The DirectoryModuleCatalog you are using in your application loads the modules from the "DirectoryModules" folder, so as the module is in the shell's folder and not in the aforementioned directory it will not picked up by the DirectoryModuleCatalog (although I'm not seeing it being created in your ConfigureAggregateCatalog method anymore).

In order to load and initialize the module you need to register it, which can be done in several ways:

  • You can move the module to the "DirectoryModules" directory for it to be picked by the DirectoryModuleCatalog (if you are still using it).
  • If you have a direct reference in the Shell to the module, you can add it manually as an AssemblyCatalog, just like you are doing with the Shell in the ConfigureAggregateCatalog method:
this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(ModuleHouseOwnerInfo).Assembly));
  • You can register the module using a ConfigurationModuleCatalog and add it to the AggregateCatalog too.
You can find more information about to use different methods of registering modules in the following chapter of the documentation:
I hope this helps,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Viewing all articles
Browse latest Browse all 1878

Trending Articles