|
|
It took me a while to figure out, but it seems that I cannot have controllers with Lazy imports. To verify, I created a clean test project with MVC3, and used the Nuget packages for MefContrib and MefContrib.MVC3 (version 1.2). I added an import on the HomeController
and it worked. Then I wrapped it in Lazy<T> and it only throws the error:
The IControllerFactory 'MefContrib.Web.Mvc.CompositionControllerFactory' did not return a controller for the name 'Home'.
Interestingly though, I can import objects that contain lazy imports, I just can't have a lazy import directly on the controller itself. Am I missing something here?
|
|
|
|
Those are indeed not supported at the moment.
|
|
|
|
I am getting a similar error on all my controllers after updating to version 1.2. However I am not using Lazy<T> at all. I never have. Is there something else that can cause this? Or better yet, where do I start to try and debug this issue?
|
|
|
|
I get same error too. Can everybody help please???
|
|
|
|
Can you post a small repro project so I can investigate?
|
|