I'm trying to create a modularization mechanism for an MVC 4 site. I have most things working via a custom ViewEngine (Razor based) but after FindView returns I get an error that the model listed in a view cannot be resolved.
The model and controller are in the module's DLL and this DLL is loaded in a MEF container. The controller is executing ok but something is clearly missing when it comes to resolving the @model in the view.
Anyone got any ideas what I'm missing here?
Thanks
Solved.
I was copying the module dll's to bin\modules so the compilation of the .cshtml.cs file couldn't find the referenced model. I now just copy the dlls to the bin folder and it works just fine.
Cheers