开发者

Are MVC2 areas with multiple projects supported in the final release?

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 g开发者_JS百科oogling 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.


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜