Multiple MVC projects in a single solution

DarthVader picture DarthVader · Jul 5, 2013 · Viewed 15.8k times · Source

I have seen in NopCommerce project that there is a solution and there are multiple MVC projects within the solution.

I have some questions about it such as :

How is it possible to share a main layout, or use different layout on demand?
How is it possible to use Controllers/Models etc. in different MVC projects?

I would also like one main project and multiple sub MVC projects. How can this be done while sharing components?

Any ideas? pointers?

Note: Not interested in Areas.

Answer

Ryan Bennett picture Ryan Bennett · Jul 5, 2013

Yes it is. See: asp.net mvc put controllers into a separate project

I've done this myself and was able to use the controllers in a plug-in type architecture.

As for the models, they are just normal classes. They can be used in any project for any reason. There is nothing special about them.