Module is not loaded by Prism framework if a type from the same module is used explicitly

荒凉一梦 提交于 2019-12-24 06:32:08

问题


We have a WPF application using prism 5 framework. Modules are loaded using DirectoryModuleCatalog. At the same time if I refer one of the modules in the start up project where bootstrapper is located and use a type from it, that module is skipped from loading.

Looks like the prism framework is skipping it as it is already loaded in AppDomain.

Is there any way to load the module albeit a type from it is referred in the startup project?


回答1:


Sounds like you are only referencing the Module and not actually adding the module to your module catalog. Either that doesn't need to be a module, or you need to create an aggregate module catalog that you can use to add multiple different catalogs.

Here is an example: http://compositewpf.codeplex.com/SourceControl/latest#V5/Quickstarts/Modularity/Desktop/ModularityWithUnity/ModularityWithUnity.Desktop/AggregateModuleCatalog.cs

Also, not sure why you are using Prism 5 as that is way out of date an no longer supported. You should be using Prism 6.3.



来源:https://stackoverflow.com/questions/43792023/module-is-not-loaded-by-prism-framework-if-a-type-from-the-same-module-is-used-e

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!