Jul 22, 2010 at 6:50 AM
Edited Jul 22, 2010 at 11:34 AM
Why would this work:
var entity1 = Container.GetExportedValue<MyEntity>();
var entity2 = Container.GetExportedValue<ExportFactory<MyEntity>>();
I can't figure out why. I just get this error. And it's true that there is no such part, but this has always worked before. I should be able to pull on my export as an ExportFactory`1 without making any changes as long as the PartCreationPolicy
is anything but Shared, which it is. I'm using the MEF 2 Preview getting the 404 equivalent of MEF.
No exports were found that match the constraint '((exportDefinition.ContractName = "System.ComponentModel.Composition.ExportFactory(MyEntity)") && (exportDefinition.Metadata.ContainsKey("ExportTypeIdentity") && "System.ComponentModel.Composition.ExportFactory(MyEntity)".Equals(exportDefinition.Metadata.get_Item("ExportTypeIdentity"))))'.
Any advice on how to debug this?