Custom DirectoryModuleCatalog couldn't get all the Modules -Prism

Topics: Prism v4 - WPF 4
Feb 24, 2013 at 10:25 AM
Edited Feb 24, 2013 at 10:26 AM
My application has 4 modules inherited from ModuleBase which implements IModule, I'm using a custom sorting routine for the modules via making a custom DirectoryModuleCatalog.

Here is some details:

During InnerLoad:
the LoadedAssemblies will contain all the Modules except the "Domain Module".

During GetModuleInfos
the call to GetNotAllreadyLoadedModuleInfos will get the Domain Module.

As a result at the end I just have 1 module instead of 4.

the code is based on This Link and is quite the same.

_I tried to change it a bit, which if there wasn't a direct solution to this,
I will post my modified version of the code which still needs some fixes on it._

What could be the solution ?
Developer
Feb 25, 2013 at 7:18 PM
Hi,

I am not familiar with the module catalog / module loader you are mentioning, but as a possible approach I believe we could start by checking if the cause of this behavior is related to the modules or not. For example, you mentioned that you are using a modified version on this PrioritizedDirectoryModuleCatalog . Does this behavior also happen when using the original PrioritizedDirectoryModuleCatalog ? Also, it could be useful if you could check your modules against Prism's default DirectoryModuleCatalog to see if the modules can be loaded correctly.

Another thing we can check are the differences (if any) between the Domain Module and the other 3 modules in order to find why the custom PrioritizedDirectoryModuleCatalog behaves differently with it than with the rest of the modules.

Regards,

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