ModularityWithMef.Desktop - CreateShell throwing exception

Jan 22, 2011 at 5:56 AM

I ran the  ModularityWithMef.Desktop is throwing an exception when the CreateShell method is called.  Below is a listing of the reason for the exception. Can anyone tell me what I must do to correct the exception being thrown? You can email me directly at stevensrf1@inbox.com

The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) A module declared a dependency on another module which is not declared to be loaded. Missing module(s): ModuleD

Resulting in: An exception occurred while calling the 'OnImportsSatisfied' method on type 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.

Resulting in: Cannot activate part 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.
Element: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager -->  Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager -->  AssemblyCatalog (Assembly="Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")

Resulting in: Cannot get export 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager")' from part 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager'.
Element: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager") -->  Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager -->  AssemblyCatalog (Assembly="Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")

Resulting in: Cannot set import 'ModularityWithMef.Desktop.Shell.moduleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager")' on part 'ModularityWithMef.Desktop.Shell'.
Element: ModularityWithMef.Desktop.Shell.moduleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager") -->  ModularityWithMef.Desktop.Shell -->  AssemblyCatalog (Assembly="ModularityWithMef.Desktop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")

Resulting in: Cannot get export 'ModularityWithMef.Desktop.Shell (ContractName="ModularityWithMef.Desktop.Shell")' from part 'ModularityWithMef.Desktop.Shell'.
Element: ModularityWithMef.Desktop.Shell (ContractName="ModularityWithMef.Desktop.Shell") -->  ModularityWithMef.Desktop.Shell -->  AssemblyCatalog (Assembly="ModularityWithMef.Desktop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null")

 

Feb 21, 2011 at 2:14 PM

Hi Steven,

I am also receiving this problem. Did you eventually work out how to resolve it?

Thanks,

Geoff

Jun 8, 2011 at 8:42 PM

This got me too. Despite the instructions in the readme, a simple F5 following install does not build either ModuleD or ModuleB into the expected location $(OutDir)\DirectoryModules. A 'Rebuild All' will fix the problem, as will making the ModularityWithMEF.Desktop project dependent on all of the other projects.