This project has moved and is read-only. For the latest updates, please go here.

MEF Beginner CompositionContainer problem

Apr 30, 2011 at 10:39 AM

Good Morning,

I am a beginner on Prism and MVVM pattern. I have in mind to create the shell in an external assembly.

The assembly is loaded on the ConfigureAggregateCatalog assembly and when I try to load the shell on the CreateShell method 

==> return this.Container.GetExportedValue<System.Windows.Window>("JS.FWK.Prism.Shell.MainWindow");

But i receive the following error:

  Message "No valid exports were found that match the constraint '((exportDefinition.ContractName == \"JS.FWK.Prism.Shell.MainWindow\") AndAlso (exportDefinition.Metadata.ContainsKey(\"ExportTypeIdentity\") AndAlso \"System.Windows.Window\".Equals(exportDefinition.Metadata.get_Item(\"ExportTypeIdentity\"))))', invalid exports may have been rejected." string

Someone could you please help me? I follow the right approach?


Many thanks for your support and regards


May 18, 2011 at 3:51 PM

See Diagnosing Composition Problems in the MEF programming guide.