MEF CTP 1 Released

Several members of my team have already spilled the beans, but yes (!) we just released our first public preview of MEF. You can grab the bits from here and read a past post for a high level overview.

I am super excited about the release. It’s a very early preview and still lots of work remains, but the CTP is a significant milestone for us. Designing a general purpose extensibility framework is hard, and so we felt very strong about releasing such an early preview to the world to get early feedback from the community. Hopefully together we can create a set of APIs that scale to the variety of extensibility scenarios: from developers using DI and IoC to large applications with extensibility points and plug-ins.

In my previous post about MEF, several people asked about constructor injection and non-attribute based programming model. Constructor injection is not supported in this preview, but we did start working on the design of the composition engine that would allow it. The non-attribute based programming model (where connections are specified externally) is actually enabled, but not built-in. I will try to post a sample showing how to do it, but for those that want to experiment themselves: you need to implement a custom component binder. The built-in binder inspects types and looks for the attributes. You custom binder might want to read the same information (which type to inject where) in some external file.