Areas in different project with ASP.NET MVC 4

user2558401 picture user2558401 · Jul 7, 2013 · Viewed 10.1k times · Source

I am working with ASP.NET MVC 4, and trying to have areas in separate projects.

I have been checking this thread where we are anticipated the non-supporting state of areas in different projects after ASP.NET MVC2:

What are the pros and cons of Areas implemented as single projects vs multiple projects in asp.net mvc

Anyone know if it is true that it is not supported anymore?

Could anyone help me to find out if there is a common way to have areas in separated projects when using ASP.NET MVC 4?

I have found this other thread that may help, but was looking for a more common way:

ASP.NET MVC 4 Areas in separate projects not working (view not found)

Thank you!

Answer

NickSuperb picture NickSuperb · Jun 25, 2014

The answer is most likely no, but I can't provide a definitive source as it concerns > version 3.

This was written in 2010:

I'm the development lead on ASP.NET MVC at Microsoft.

There are no plans to include multi-project areas in ASP.NET MVC 3. However, it's definitely an area that we plan to revisit in the future.

In the meantime MvcContrib's solutions are probably the best bet. The MVC Futures download still includes an old (and perhaps only semi-functional) version of the original multi-project areas feature. Because the full source code for it is also available, you might be able to construct a solution that is customized to your needs.

Currently, the areas template as provided in VS2013 does not provide an out of the box solution for this. My assumption would be that it is "possible" but not supported. The greater question would be, what scenario are you encountering where it is necessary to put your areas into different projects?