If I understand correctly, when the application begins you don’t know what the available plug-ins will be. Thus, your specific concern is not how to load them on demand, but how to discover them instead.
If this is your scenario, discovering modules at runtime is not something Prism supports out of the box. That is, Prism (out-of-the-box) allows you to
specify through configuration which modules will be loaded, and this is only done during the application’s bootstrapping process. This is useful to avoid compile time dependencies, but
does not provide the capability of discovering new modules while the application is running.
While it is possible to build this kind of functionality into Prism, you might should still consider checking
MEF out as it was created to address dynamic composition scenarios like this. It is possible to integrate Prism and MEF together, so that might also help you achieve what you want.
A possible way to load the modules on demand if you already know them (not at compile time but before running the application), could be writing each plug-in as a module as you said and
use on demand module loading. You would have no need to rebuild the application, just updating the
ModulesCatalog.xaml before loading your app. Thus, the user can choose only those plug-ins he wishes to load. The flow of your application would be something like:
- Load a module that provides the user with a view that gives the option of which plug-ins to load.
This thread might be useful for that.
- Load the different modules on demand based on the user’s choice.
While this is a suitable approach and a scenario Prism is intended to target, you might also find it useful
Please let me know if this helps.