Description
After upgrading my project to the latest release, I started receiving error messages like this when loading a module (this one is actually from the ModularityWithMef quickstart, repro instructions below):
“The composition remains unchanged. The changes were rejected because of the following error(s): The composition produced multiple composition errors, with 10 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information.
1) Change in exports prevented by non-recomposable import ‘Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager.MefXapModuleTypeLoader (ContractName=”Microsoft.Practices.Prism.MefExtensions.Modularity.MefXapModuleTypeLoader”)’ on part ‘Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager’.
…”
撰写保持不变。由于以下错误,更改被拒绝: X
The composition remains unchanged. The changes were rejected because of the following error(s): X
解决方法
在你的主项目(Shell)中将
* Microsoft.Practices.Prism
* Microsoft.Practices.Prism.MefExtensions的Copy Local set True,在子模块应用中设定Copy Local 为False;