MefContrib/MefContrib — Issue #30: MefContrib.MVC doesn't handle parts with ContractName (ConventionCatalog or PartRegistry bug?)
Author: leidegre
Created: 2012-03-06 15:05:03+00:00
State: open

For simple repo, go file new project, ASP.NET MVC 3 app, then add the NuGet package MefContrib.MVC3

Create a simple property import or constructor import with a custom contract name.

Set a breakpoint just after the catalog has been created in the WebActivator start method.

Inspect catalog.Parts, locate your controller part definition and look under import definitions. What you'll find is that the ExportTypeIdentity is being used as ContractName.

I'm not sure whether this is a bug in the ConventionCatalog or PartRegistry but it's definitely some kind of bug.