I really have 2 questions. Both are about loading modules, and seem like they should be simple questions.
I have a fairly mature WPF application using Prism and Unity where, to date, we were loading the modules from a particular directory, which requires references to the dependent DLLs in the shell application. I would like to get rid of this dependency
for a few reasons:
1. I hate having the app build every time I press F5.
2. We are creating a shell to be owned by another group, and therefore having references to our particular modules/dlls in a shell no longer owned by us is incorrect.
To this end, I have placed the module catalog loading in a .config file and loaded it from there (per prism config file loading approach). But, this appears to still require the module dlls to live in the application directory, or at least have a copy
there. if not it bombs at startup with DLLs it can't find.
In addition, I want the shell to load up and then load the modules up after, to give the user the experience of rapid response of the shell popping up. I tried to do this by loading the modules on demand by having a module controller listening for
an event launched from the end of the shell startup. Unfortunately, it sends the event and carries on, but the shell still doesn't come up completely until all the modules are loaded. I suspect this is some assumption about event execution I have
made which is wrong.
So, My 2 questions are:
1. Can I load modules without having the dependent DLLs in the .EXE directory, and if so, how?
2. Regardless of whether I can, what is the best way to get the shell to pop up and then have the modules load up directly after?
Any help is greatly appreciated.