I have an "ASP.NET MVC 4 Web Application" divided in multiple areas in Visual Studio 2013.
The project grown large to the extent that I currently have a large number of areas in the application.
There one specific area that can be separated in another MVC 4 application by itself. I created a new MVC 4 application and moved this area to that application.
These are the problem I am facing:
- The moved area uses code from other classes in the original app. Specifically, there is Shared area that contains some Attributes as well as a BaseController.
- The views of the moved area also uses JS scripts and other content. Most of the time, the used scripts are not exclusive or specific to the area that uses them. So the content is cross referenced among many areas.
Here is what I tried:
- To solve compilation errors, I tried to add reference from the old MVC app to the new MVC app so that the classes in the new app can see other classes in the old app such as classes in the shared area. However, this didn't seem to solve the problem.
- To fix JS script and content issues, I created a solution folder and moved all the scripts to it. However, I can't verify whether that works or not since I can start the app due to compilation errors.
Here are my questions:
- Does VS2013 provide some facility to separate MVC application or make an app refer to code and content from another app?
- What do you think to be the best strategy to make such separation?
I tried searching SO and Google for how to accomplish such separation. However, what I found seems to be applicable to previous versions of MVC and VS. Since I am new the concept of MVC areas and MVC in general I can't get around this.