Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Why use Castle Windsor if MEF can handle IoC itself? – Carnotaurus Apr 3 '11 at 10:41
Because from what I have read MEF is not a true IOC with life cycle support. – Erin Apr 3 '11 at 16:05
I guess there is no advance on this then:… – Carnotaurus Apr 5 '11 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 '11 at 19:26

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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