Trying to figure out what this MEF Composition error means?

When you're importing a collection of exports, you need to be explicit about it by using the ImportMany attribute. Change your property attribute like this.

When you're importing a collection of exports, you need to be explicit about it by using the ImportMany attribute. Change your property attribute like this: ImportMany(typeof(IMenu)) public IEnumerable Menus { get; set; } You should also be able to exclude the contract (the "typeof(Menu)" parameter) since you're importing the same type that was exported. Leave the contract on the Export attributes though.

ImportMany public IEnumerable Menus { get; set; }.

Bah..dang 5 minute timer. If you don't see the answer accepted in a few minutes...comment back. – IAbstract Dec 6 '10 at 3:57 I'm finally getting the hang of using MEF.So far, I'm a fan.

– IAbstract Dec 6 '10 at 4:15 It's an awesome library. Glad I could help, @dboarman! – Matt Hamilton Dec 6 '10 at 4:39 I've seen your picture on a blog somewhere about MEF... – IAbstract Dec 6 '10 at 13:04 @dboarman Yeah I played with it quite a bit when it was in CTP form, and still dabble nowadays.

– Matt Hamilton Dec 6 '10 at 19:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions