Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

10-4 Episode 32: MEF Preview 7

29 minutes, 8 seconds


Right click “Save as…”

In this episode of 10-4, we revisit the Managed Extensibility Framework and take a look at all the new improvements made in the latest available release, Preview 7.

For more information on the Managed Extensibility Framework, make sure to check out its home on Codeplex: http://www.codeplex.com/mef.

Resources from this episode:
- [Nicholas Blumhardt] Analyze MEF Assemblies from the Command Line
- [Laurent Bugnion] MVVM Light Toolkit

For more 10-4 episodes, be sure to visit:

10-4! Over and out!


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
  • Allan LindqvistaL_ Kinect ftw

    cool ive been waiting for a MEF update for a long time (indeed hardcore developer content has been pretty thin lately.....)


    im kinda sad to hear that .net gets pushed aside in favor of silverlight once again.. it seems like .net desktop is always getting pushed aside Sad hopefully all these stuff that "eventually will make it into .net desktop" will actually make it in .net desktop in a timely fashion..

    it also seems like the shipped version of MEF in .net 4 will already be outdated before it even ships Sad


    hopefully im wrong about this but microsoft needs to show that they care about industrial devs that have to plan and cant always use beta code..


    sorry for beeing so negative, mef is awsome Smiley 

  • Tomasz Wisniewskiwisnia Tomasz Wisniewski

    Great episode Smiley

    Love listening to Glenn because he always speaks a LOT of code, not some PPTX non-sense and he explains everything very clearly Smiley

    Thanks again for the tour about MEF in Poland Glenn!

  • I may have missed something at some point, but when did the ability to hook into another IoC container get added?  This has been a hot topic for MEF, and I didn't see anything about it in the release notes.


    Regardless, does this mean that I can use (for instance) Windsor as the back-end container for MEF, and it would give Windsor the ability to discover plugins and compose based on the Import and Export attributes in MEF?  If so, this is great news!  We had just decided to drop MEF in favor of rolling our own plugin discovery with Windsor... maybe we don't have to anymore.

  • Adron Halladronbh Adron

    I wonder how well Office Excel & Outlook Components will work with this framework?  I'm about to find out!  Smiley  Hooking up a WPF/Silverlight/Office Excel/Outlook 2007 Application real soon.

  • Hi Al


    We definitely plan on rolling the new features into the full framework. It's too late in the cycle to do that for .NET 4.0, if we could we definitely would.


    Silverlight ships on a different schedule, which opened up the opportunity to add new features like we are doing. For the desktop, we plan to make 3.5/4.0 versions of those features available on Codeplex in the interim.




  • Hi Bondsbw


    We have supported this for quite a while now. Our container accepts custom ExportProviders which can talk to another source for exports including an IoC container. There's an example out there in the community now that leverages this for integration with Unity. You can find it at mefcontrb.codeplex.com.


    You are correct in your understanding. With an EP, you can have MEF parts with Imports that will be provided by an IoC container. We'll be doing a blog post on this at some point. But this post covers the fundamentals: http://codebetter.com/blogs/glenn.block/archive/2008/12/25/using-exportprovider-to-customize-container-behavior-part-i.aspx



  • Thanks Tomasz. I am surprised you want to see any more of my code after the hours upon hours that you saw in Poland Smiley


  • Cool, good luck. Let us know how it works out, and blog blog blog Smiley

  • Thanks Glenn. Smiley


    Do you (or anyone) know if there is work on a custom ExportProvider for CommonServiceLocator containers?  I've found this:  http://commonservicelocator.codeplex.com/Wiki/View.aspx?title=MEF%20Adapter.  But it looks to only expose MEF's container as a CSL.


    Thanks again!


  • Allan LindqvistaL_ Kinect ftw

    im glad to hear that  Smiley

    another question though, how will the released .net4 version relate to upcoming MEF releases? will we not reference  the old versions and just reference the new ones or will you do more addative releases? im just curious Smiley but it would seem a little strange to have an old version just hanging around in the gac, not beeing used

  • Brandon


    Good question and timing. Yes, I am planning to put one in contrib. Here's the code if you want it now Smiley




    If you look in the sample you will notice a Unity extension as well. The reason is that to use this EP, something has to tell it the available registered types so that it can map them to contract names, as MEF is solely contract based. You'll see the extension invokes a method on the EP.

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.