MEF’s Convention model

In the last drop of MEF on codeplex we introduced a handful of interesting features. One of them – which has a large API surface – is the new registration mechanism. It allows you to accomplish interesting things: Define a predicate (rule) that will cause all matching types to be exported as MEF parts Export…


MEF Gems 2 of many: Collections

So in the previous gem I went over the differences between import and import many. Now let’s consider the different ways to import many dependencies. Check this piece of code: [InheritedExport] abstract class Foo { } class Foo1 : Foo { } class Foo2 : Foo { } class Foo3 : Foo { } So…


MEF Gems–1 of many: Import vs ImportMany

Phew! We’ve been working hard! I’m planning to put another Codeplex drop soon so you can see and test the changes, and of course, share your feedback. Also looking forward to run a usability test – let me know if you’re in seattle/redmond area and if you’re willing to participate! If you’ve been using MEF…


Container hierarchies in MEF: shaping it for the future (maybe)

Recapping: MEF supports two creation policies: shared (think singleton) or non-shared (think transient, prototype or a fancy new operator). MEF also recognizes types that implement IDisposable and correctly “implement the protocol” for calling Dispose on them in the right time. This is all goodness, but as applications grow in complexity, this is hardly enough. You…


MEF features for – feedback request

We’re in planning phase for MEF for quite some time. I believe we have a very decent idea of things that needs improvement, and the priority of those. Of course, our team has limited resources so there are no promises whether we can actually ship any of those in the next MEF release. That said,…


MEF: What and why

So it’s been almost two years working for Microsoft and feels like several years. Not because I was able to accomplish much – I haven’t – but that things go in a different pace here. I learned to understand why that is, and how Microsoft can afford to pay smart people to solve tough problems….


MEF and ASP.NET MVC sample updated

Sample updated to Preview 6. I’ve also took the time to simplify the MvcCatalog and to hard set the Creation Policy to Non Shared for all controllers. Have fun!


MEF and ASP.NET MVC sample

Disclaimer First things first, don’t consider this sample an official sample. It is just something I’ve created to illustrate some capabilities of MEF when integrated with ASP.NET MVC in the user-level (as opposed to framework level). Also, if you would try to do this integration yourself, you’ll notice at some point that you’ll need to…


Dependencies, ownership and lifetime

First of all, this blog post contains my own views and does not necessarily reflect the view of employer. MEF is a complex small project, dealing with a big and complex problem. In our team a feature crew – a PM, dev and tester – owns a feature. We research, brainstorm, prototype to exhaustion, come…



If you don’t know me my name is Hamilton Verissimo, and I recently joined the MEF team at MS (DevDiv). I’ll use this blog to talk about MEF and – give me some time to settle in – other things I plan to be involved with.    My other blog will be kept but exclusively…