I am thinking of using MEF to manage the fluent interface on Castle Windsor. Allowing for me to swap out different sections of the system for test and production. Has anyone done this if so how well did it work for you?

  • 1
    Why use Castle Windsor if MEF can handle IoC itself?
    – Phil C
    Apr 3, 2011 at 10:41
  • Because from what I have read MEF is not a true IOC with life cycle support.
    – Erin
    Apr 3, 2011 at 16:05
  • I guess there is no advance on this then: msmvps.com/blogs/peterritchie/archive/2010/02/24/…
    – Phil C
    Apr 5, 2011 at 16:48
  • From my understanding there isn't. MEF gives me the ability to add or change on the fly by refreshing the catalogs. I don't know of an IOC do.
    – Erin
    Apr 5, 2011 at 19:26

1 Answer 1


It's true, MEF can be made to act like a DI container but only for simple scenarios. From my experience and based on research I've done MEF's and IoC containers ideal roles might be:

  • define third-party extension points using MEF
  • locate and load these extensions using MEF
  • structure and manage the host application’s fixed architecture using an IoC container

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.