This project has moved and is read-only. For the latest updates, please go here.

is MEF going to Eat all properties of UNIT

Mar 12, 2011 at 6:16 AM


 in reality its a two fold question:

1. is MEF going to Eat all properties of UNIT especialy the read of configuration files and constructor injection?

2. Is Unity going to dead(left without new resources that work on it)?

Mar 12, 2011 at 7:34 PM

WRT #2. Why do you think Unity is dead and has no resources working on it? AFAIK that's not true at all.


Mar 13, 2011 at 6:06 AM


    i did not mean to offend any one, just that i have several needs some DI properties like constructor injection, prop injection, and string configuration loading.

  and saw that MS added MEF to .Net 4.0 and the unity project hasn't released any new version previews for more than 10 months, so i had to check if MS going to stay on it or leave it.



Mar 14, 2011 at 5:33 AM

I believe Unity and MEF have some overlap in goals, but they also have differences. Also, the fact that MEF is lower on the stack makes it almost impossible to support feature such as interceptors/AOP that Unity supports. Finally, Unity is quite extensible as it offers runtime hooks, and MEF is not likely to support those since it may create an indirect dependence on Components that only work if/when certain hooks are in place.

Mar 14, 2011 at 7:04 AM


     and just to make sure, you are saying that MEF does not and will not support run-time loading of configuration files?

Mar 14, 2011 at 7:05 AM

I can't predict the future, but that's unlikely to be supported in-the-box. You can easily add support for that by coding your own ExportProvider, though.

Mar 14, 2011 at 6:40 PM


MefContrib supports AOP now through the new InterceptingCatalog. You can read more on it here: It includes support for Castle Dynamic Proxy out of the box, but you can easily wire it up to any AOP mechanism.



Mar 16, 2011 at 9:39 AM


Mar 18, 2011 at 10:08 PM

As a Unity PM, I've replied to your post here. Bottom line: Unity is alive and well. 

- Grigori