I am using Prism 4.1 as my application framework. there are a couple of modules in my app, what i want is to load each module when it's needed. below are the main codesnippets of my app:
In Bootstrapper class:
protected override void ConfigureAggregateCatalog()
DirectoryCatalog catalog = new DirectoryCatalog("DirectoryModules");
one module class:
[Module(ModuleName = "ModuleHouseOwnerInfo", OnDemand = true)]
public class ModuleHouseOwnerInfo : IModule
However, it seems to me that module attribute OnDemand = true doesn't work as expected, because I did see my ModuleHouseOwnerInfo.dll is loaded in memory when my app is loaded.
by the way, the ModuleHouseOwnerInfo.dll is output to folder DirectoryModules.
In addition, I don't want to use LoadModule API to load my module dynamically as I have a lot of modules in my app and i don't like to load each in code.
Anyone can help me on this? Any input will be much appreciated.