locked
Area support in ASP.NET MVC 2 RC RRS feed

  • Question

  • User655244891 posted

    I have asp.net MVC 2 RC installed with VS 2008 SP1.

    I tried to follow Walkthrough: Creating an ASP.NET MVC Areas Application Using Multiple Projects (http://msdn.microsoft.com/en-us/library/ee307987(VS.100).aspx), but I was stuck at Step "Enabling the custom build step for MVC areas projects", because I could NOT find anything like "

    <!-- To enable MVC area subproject support

    " in any project files.

    Any ideas?

    Thanks.

    Tuesday, January 19, 2010 5:01 PM

Answers

All replies

  • User-1825197574 posted

    Hi

    We removed support for multi project areas from the core product in the Beta release. You'll have to download the custom build task from CodePlex at http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423 The zip file contains the custom build task DLL that you will need to use. 

    You either need to grab a project file from a Preview 2 project or take a look at http://dotnetslackers.com/articles/aspnet/A-First-Look-at-ASP-NET-MVC-2.aspx#multiproject-areas for an example. I'll talk to our documentation writers to see whether we can get the walk through updated. Since it's not part of the core product anymore, we might end up removing that walk through altogether.

    Thanks,

    Jacques

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, January 19, 2010 9:25 PM
  • User655244891 posted

    So, is there gonna be multiple project area support in RTM release?

    Hi

    We removed support for multi project areas from the core product in the Beta release. You'll have to download the custom build task from CodePlex at http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37423 The zip file contains the custom build task DLL that you will need to use. 

    You either need to grab a project file from a Preview 2 project or take a look at http://dotnetslackers.com/articles/aspnet/A-First-Look-at-ASP-NET-MVC-2.aspx#multiproject-areas for an example. I'll talk to our documentation writers to see whether we can get the walk through updated. Since it's not part of the core product anymore, we might end up removing that walk through altogether.

    Thanks,

    Jacques


    Wednesday, January 20, 2010 9:08 AM
  • User-1753984806 posted

    Hi, I did everything step by step like in the walkthrough.

    I've found a solution for missing dll file: http://stackoverflow.com/questions/2005018/asp-net-mvc-2-areas-and-afterbuildcompiler/2096884#2096884

    So now everything builds just fine, but it just doesn't work in runtime.

    Is it supported, should I spend more time on finding issue in my code or maby just drop it and find another solution to make my MVC application pluggable ?


    Could someone from MVC team provide a tutorial for Areas in RC version ? I thing it's one of the coolest features in MVC framework.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 20, 2010 9:52 AM
  • User-1825197574 posted

    Hi

    What sort of problems are you encountering when running the application?

    Multi project area support will not be a core feature for RTM. We will however support areas within a single project. Take a look at the post by Phil Haack at http://haacked.com/archive/2009/07/31/single-project-areas.aspx

    Jacques 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 20, 2010 11:51 AM
  • User364126144 posted

     Hi Jarekm,

    MSDN provides a good step-by-step walkthrough about how to implement Areas in MVC 2: Organizing an ASP.NET MVC Application using Areas<!---->.

    Note that this walkthrough describes single-project areas. There is no support in MVC 2 for multi-project areas.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 20, 2010 12:09 PM
  • User-1753984806 posted

    Ok, so if i need to load my views/controllers from another dlls I need to find another solution.

    Areas in single project are not as cool as loading my content from another projects :)


    Thx for reply guys.


    Wednesday, January 20, 2010 12:40 PM
  • User1041247542 posted

    It'd be really nice if someone could take down that tutorial.  I just wasted 45 minutes of my time walking through this tutorial simply to find it doesn't apply any more.  That's aggravating. 

    Tuesday, March 2, 2010 9:15 AM
  • User-941204986 posted

     Hi Jarekm,

    MSDN provides a good step-by-step walkthrough about how to implement Areas in MVC 2: Organizing an ASP.NET MVC Application using Areas.

    Note that this walkthrough describes single-project areas. There is no support in MVC 2 for multi-project areas.

     

     

    ummmm, is this going to be updated with complete instructions....

    Insert the following code directly after the <asp:ContentPlaceHolder ID="MainContent" runat="server" /> element.

    This code adds diagnostic information to the views.

     

    code?  what code?  it's not there.

    makes this "tutorial" just a bit confusing.

    Wednesday, March 3, 2010 3:27 PM
  • User-941204986 posted

    Ok, so if i need to load my views/controllers from another dlls I need to find another solution.

    Areas in single project are not as cool as loading my content from another projects :)

     

     

    I have a MEF based solution for this.

    Portable Areas in MVCContrib is another solution.

    Wednesday, March 3, 2010 3:44 PM
  • User364126144 posted

     This problem has been fixed and the topic will be updated for the upcoming release of ASP.NET MVC 2. In the meantime, all of the code is available for download from Code Gallery at ASP.NET MVC 2 Code Examples.

    Friday, March 5, 2010 2:35 PM
  • User-941204986 posted

    excellent, Thank you for updating the sample so quickly! 
    at http://msdn.microsoft.com/en-us/library/ee671793(VS.100).aspx

     

    Friday, March 5, 2010 3:52 PM