views:

21

answers:

0

I've created an MVC 2 project with nested areas, such as:

Areas
-->A
   -->C
      --> Controllers
      --> Models
      --> Views
   -->D
      --> Controllers
      --> Models
      --> Views
   -->Controllers
   -->Models
   -->Views
-->B
   -->E
      --> Controllers
      --> Models
      --> Views 
   -->F
      --> Controllers
      --> Models
      --> Views 
   -->Controllers
   -->Models
   -->Views
Controllers
Models
Views

This works and correctly finds all the controllers/views as long as I modify the area names in the area registration files to be "A/C" instead of simply "C". However, the default behavior for Visual Studio is not correct for this project layout. If I add an action method to a controller inside "A/C/Controllers", right-click and choose "Add View", VS creates the folder and file "A/Views/{controller}/{action}.aspx" instead of "A/C/Views/{controller}/{action}."

Is there a way to change this default behavior? Perhaps create an add-on that overrides the default behavior? I'm pretty new to .NET and VS 2010 so any help is greatly appreciated.