Portable MEF (Microsoft.Composition)

Part1: Attribute Model

Part2: Convention

Part 3: Dependency Injection vs. Service Locator

Part 4: Microsoft.Composition (Portable MEF): Scoping


MEF 2.0 (Full Version) TOC

MEF 2.0 is a reflection of a community requests.
features like Open Generics, fluent and conventional discovery, lifetime handling of the part, better exception handling and more, was all requested by the community.

MEF, Import, Export, CompositionContainer, RegistrationBuilder, Catalog, Generics

you can read more about MEF 1 series:

Shout it

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



  1. converse sale2013/12/12 ב 19:14

    Amazі&X6E;g &X62;log! Do yo&X75;
    have any he&X6c;рful hints fοr aspiгing writегs?
    I’m p&X6C;an&X6E;ing to stаr&X74; my ow&X6E;
    wеbsitе soon but I’m a little lost on everything.
    Would you aԁvise starti&X6E;g with a free platform l&X69;ke Wordpreѕs or go for a paid optіon?
    There ar&X65; so many с&X68;oiceѕ out there that ӏ’m
    completel&X79; c&X6F;nf&X75;sed .. Any tipѕ?
    Thank you!

  2. Roscoe2013/12/16 ב 08:53

    I wаs curious if уou еver considered changing thе structure of
    yοur site? ӏts very well written; I love what youve got to say.
    But maybe yοu сould a littlе more іn the ωay οf content soo people cοuld connect ωith
    it bеtter. Youve gоt аn awful lot of text for only hаving one
    оr two images. Мaybe уou сould space іt out bеtter?

  3. Omnius2015/02/14 ב 18:35


    I’m building a store app using Windows Runtime in WP 8.1. I have a problem: in my solution structure, the Data layer and the App itself are in different projects therefore in different assemblies as well. The only common point between the so-called back end and the front end is a shared assembly, where are the interfaces for the repository classes, the entities and so on.

    I’m using the Microsoft Composition (MEF2) for DI and It works well If the CompositionHost needs to look into just one assembly (the assembly of the app itself) but If I want to import some types which are imported in an another assembly or assemblies the system tells me that no exports found for the types.

    This kind of situation can be handled in WPF or even SL because of the GetExecutingAssembly() method but in WinRT, just the following code works: CompositionHost = new ContainerConfiguration().WithAssemblies(assemblies).CreateContainer(); I know the fluent interface has a WithAssemblies(IEnumerable assemblies) method but still I do not know how I reach the exports which are made in different assemblies.

    Thank you for your help in advance!

    Best regards,

  4. dor cohen2016/08/22 ב 17:31

    I’ll immediately grasp your rss feed as I can’t in finding your email subscription link or newsletter service. Do you have any? Please let me realize in order that I may just subscribe. Thanks.

    1. Bnaya Eshet
      Bnaya Eshet2016/09/02 ב 14:16

      Only the RSS of the blog

  5. dor cohen2016/11/20 ב 12:44

    I really appreciate this post. I’ve been looking everywhere for this! Thank goodness I found it on Bing. You’ve made my day! Thx again!