Apr 6, 2011 at 5:58 PM
Edited Apr 6, 2011 at 6:00 PM
I faced very strange problem.
Prism application has 1 Class Library project
- MyLibrary project, which has MyBaseClass.cs
and 2 modules:
- MyLibsModule (consist MyLibrary.dll).
- MyModule which depends on MyLibsModule (dependency set in ModuleCatalog.xaml).
So Idea is to have module with dll's and separate MyLibrary.dll from other modules.
Now, MyModule project has a helper class which overrides MyBaseClass class defined in MyLibrary.
In MyModule I refer MyLibrary project and set CopyLocal=false, as dependency MyLibsModule has it.
Problem is that MyModule fails initializing/constructing if MyLibrary.dll is set to CopyLocal=false.
If I remove helper class (or remove inheritance from class defined in MyLibsModule), everything is working fine.
If I set CopyLocal=true for mydll.dll in MyModule, it works fine as well. But I don't want to set copyLocal=true, as dependency Module MyLibsModule has this dll, and I don't need duplicate.
How come that MyModule fails with complain abt missed MyLibrary.dll if even constructor is not called in it.
I expect sequence of events like this:
1. MyLibsModule.xaml, MyModule.xaml downloaded from server,
2. MyLibsModule constructor called.
3. MyLibsModule imported.
4. MyLibsModule initialized.
5. MyModule constructor called,
6. MyModule imported.
7. MyModule initialized.
If MyModule is loaded with Shell (InitializationMode="WhenAvailable", which is equal to referencing MyLibrary.dll at compile time) then MyModule is loading no problem. I want all modules loaded on demand...-))