views:

300

answers:

2

I had been following this guide to get areas with multiple projects setup: http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx

I was stumbling on the step where you modify the .csproj files to enable the AfterBuild configuration. My googling led me to this post from Steve Mosely: http://avingtonsolutions.com/blog/post/2010/04/03/JQuery-AspNet-MVC-2-Multi-Project-Areas-and-Other-News-Minutia.aspx

So far the only hang up I had was that I had set up my solution to incorporate multi project areas which was supported in the MVC 2 preview releases of Areas. However, when the RTM came out it was no longer supported. I searched and searched for solutions to my dilemma, but the only thing I could find was post by Jonathon who basically had the same experience I had, and a reference to an obscure message on a message board saying (by what appeared to be some one from the ASP Team) that it was not supported. To date, I haven't found any more formal post or article saying that was not the case.

Is this true? Did this feature get removed from 2010 MVC2? I haven't been able to find a definite answer.

+2  A: 

They were removed in Preview 2. The only supported use of areas are single-project areas.

Levi
Thanks! Any idea why?
jslatts
There were simply too many problems. Files had to be copied around (and would interfere with version control systems), references updated, etc. And ASP.NET sites are run as one single application in one single AppDomain, so it didn't make sense to try to take multiple applications from multiple projects and merge them together.
Levi
Thanks for the great explanation Levi! I have worked around my issue for now, though using Areas would have been cleaner.
jslatts
A: 

You can reference the Build assembly in the "Futures" download for both MVC2 and MVC3. Of course, multiple Areas are supported in the RC within a single project. I completely disagree with Levi that it didn't make sense to merge multiple projects. It makes total sense when you develop large applications and desire to break up the functionality into "modules", or "mini applications". Simply research topics like "OO programming", "composition", "modular", "dependency injection", "inversion of control", "aspects" and related frameworks like "MEF", "Unity", "Prism", "Composite Application Framework", SmartClient application block, etc. (not to mention all of the incredible non-MS frameworks, but mentioning one means not mentioning another and people get all touchy about things like that...).

Notes: 1) The documented MSBuild tasks are not included in the project files in the release, so you must find and add them and 2) The futures assemblies are not strongly named, so you will want to change the MSBuild tasks to use the "PublicKeyToken=null" in the "AssemblyName" paths.

Eric Swanson