Prism dynamic module loading on runtime

574 Views Asked by At

I have an application with Prism as framework and I use MEF as DI manager. In my application I have a combobox and when selection changed then it will load different modules in Runtime. There is a blog by Brian Lagunas but it's only for Unity - http://brianlagunas.com/prism-dynamically-discover-and-load-modules-at-runtime/. Any help for this? Thanks

1

There are 1 best solutions below

0
Coops On

From a blank project you would need to pull in the Prism libraries along with Prism.Mef via NuGet, once you've done that you should be able to use:

public class Bootstrapper : MefBootstrapper

in Bootstrapper.cs

From there you do all the DI stuff using the MEF attributes and everything should hang together nicely.