I need an MVC 3.0 project to support modules. Modulo, I mean the presence of a separate library, which includes model representations and controllers. The reason for this is to have reusable parts of the application that can be used by multiple applications.
The best thing for me would be to have these modules as mvc applications - have resharper, mvc visual studio addons. I mean intellisense, navigation, view and control, etc. screens. If I include these classes in the generic libraty class, the functionality will disappear.
setting up the application to use my controllers from the module application is quite simple.
routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults , new[] { "ModuleApplication1.Controllers" } );
the problem is that the view that the controller is trying to load is not in the current application, but it is in my "modular" application. Worse, opinions are not compiled or embedded in the dll at all. I do not want to copy them. I prefer to load them from dll. If possible.
I admit that I am new to MVC.
Am I missing something? Are there any solutions? Is my approach completely wrong?
source share