ASP.NET MVC 2 RC Released, mvc 0 comments suggest edit

Paternity leave is not all fun and games. Mostly it’s soothing an irate baby and toddler while dealing with explosive poo episodes. Believe me when I say the term “blow out” is apt. That’s probably not the imagery you were hoping for in a technical blog post, but I think you can handle it. ;)066 What!? It’s already time for an RC?! I think I need to be changed.

While I’m on leave, the ASP.NET MVC team continues its hard work and is now ready to announce the release candidate for ASP.NET MVC 2. Go get it now!

Download ASP.NET MVC 2 Release Candidate

As always, the release notes provide a summary of what’s changed. Also, stay tuned as I expect we’ll see one of those epic ScottGu blog posts on the release soon.


As you might expect from a release candidate, most of the work focused on bug fixes and improvements to existing features. We also spent a lot of time on performance profiling and optimization.

Much of the focus on this release was in the client validation scripts. For example, the validation script was moved into its own file and can be included at the top or bottom of the page. Client validation also now supports globalization.

The other change related to validation is that the ValidationSummary now supports overloads where only model-level errors are displayed. This is useful if you are displaying validation messages inline next to each form field. Previously, these messages would be duplicated in the validation summary. With these new changes, you can have the summary display an overall validation message (ex. “There were errors in your form submission”) as well as a list of validation messages which don’t apply to a specific field.

What’s Next?

RTM of course! The RTM release of ASP.NET MVC will be included in the RTM release of Visual Studio 2010, which is slated for some time in March. The VS2008 version of ASP.NET MVC 2 might release earlier than that. We’re still working out those details.

Found a typo or error? Suggest an edit! If accepted, your contribution is listed automatically here.



51 responses

  1. Avatar for Javier Lozano
    Javier Lozano December 16th, 2009

    Nice pic! :) She's getting big!

  2. Avatar for Javier Lozano
    Javier Lozano December 16th, 2009

    Here's an actual tech related comment... :)
    Are you guys planning on releasing the .NET 4 bits too?

  3. Avatar for Sergio Pereira
    Sergio Pereira December 16th, 2009

    Happy to see 2 RC's for ASP.NET MVC in less than a year. That's another important selling point for us trying to introduce MVC in our organizations.
    That picture caption looks more like: "What? My dad is releasing software during my paternity leave? How did I get assigned to this family?"

  4. Avatar for Mark Harrison
    Mark Harrison December 16th, 2009

    Just installed the RC, and theres no out of the box support for area manifests in the projects from preview 2, any hints on how to get it up and running?

  5. Avatar for Erik
    Erik December 16th, 2009

    "Believe me when I say the term “blow out” is apt." - MAN do I know how you feel. Hah!
    Grats on the RC - I can't wait to check it out. =)

  6. Avatar for Elijah Manor
    Elijah Manor December 16th, 2009

    Awesome! Thanks for the update.
    Will the install support VS 2010 tooling or is that reserved for the final product that will be shipped with VS 2010 in March?
    Thanks again!

  7. Avatar for Fredrik
    Fredrik December 16th, 2009

    Awesome! Thanks for the RC :)

  8. Avatar for Felipe Lima
    Felipe Lima December 16th, 2009

    Great work Phil! Thanks a lot!

  9. Avatar for Raj
    Raj December 16th, 2009

    Web Platform Installer does not show MVC 2 as a download

  10. Avatar for Ali
    Ali December 16th, 2009

    What a fast installation ! Whats the trick Phil ? previous versions took longer installation

  11. Avatar for josh
    josh December 16th, 2009

    caption: 'I've got a release candidate for you, dad'
    /yep, i'm an geek

  12. Avatar for Yitzhak
    Yitzhak December 16th, 2009

    Great news.
    What about corresponding ASP.NET MVC Futures?
    What functionality, if any, was moved from the Futures to the main trunk?

  13. Avatar for Charles Williams
    Charles Williams December 16th, 2009

    After 4 kids, I know the term: "containment breech" well. Mazeltov.
    On a more technical note, do you know of a way to handle dependent required fields? I was thinking of implementing a [RequiredIfAttribute]

  14. Avatar for Andrew Davey
    Andrew Davey December 16th, 2009

    Can someone explain how to get jQuery validation working with this release? It seems like lots has changed/moved since previous releases - making it very hard to get a straight answer from Google!

  15. Avatar for Wayne Brantley
    Wayne Brantley December 16th, 2009

    Lots of bugfixes - the release notes mention 3 of them. Bug fix rate must be slowing with holidays. :-)
    Release notes say you CANNOT have VS2010 beta installed! Ugh.
    What about the source for MVC and futures? Codeplex was not updated.
    Thanks for the update though!

  16. Avatar for Jeffrey Palermo
    Jeffrey Palermo December 16th, 2009

    Thanks for being so quick about it

  17. Avatar for Nathan Roe
    Nathan Roe December 16th, 2009

    When will the source code and futures assembly be released?

  18. Avatar for Koistya `Navin
    Koistya `Navin December 16th, 2009

    Great news!

  19. Avatar for Wayne Brantley
    Wayne Brantley December 16th, 2009

    This code no longer compiles - so I guess no longer required.
    <% ViewContext.FormContext.ClientValidationFunction = "EnableClientValidation"; %>
    However, removing it makes client validation not work. No source, no docs, not sure what to do.

  20. Avatar for Eilon Lipton
    Eilon Lipton December 16th, 2009

    Hi everyone - Both MVC Futures and the source code will be released later today on CodePlex. Please stay tuned!
    The MVC Futures download will include the jQuery Validation adapter as well as the Areas Build Task that were removed from the official product.

  21. Avatar for BuzzBox
    BuzzBox December 16th, 2009

    Again no support for VS10 Beta2???

  22. Avatar for Eilon Lipton
    Eilon Lipton December 16th, 2009

    Regarding Visual Studio 2010 and .NET 4 support, that is unfortunately not a feasible option. The most recent public release of VS2010 and .NET 4 is Beta 2. However, our internal builds of MVC 2 for VS2010 and .NET 4 depend on features that were available only after Beta 2. In other words, if we released what we have right now for VS2010 and .NET 4 then it wouldn't even run.
    The alternative would be for us to keep building a version of MVC 2 for VS2010 and .NET 4 Beta 2, but that was too much extra effort for a very small ASP.NET MVC team :(

  23. Avatar for BuzzBox
    BuzzBox December 16th, 2009

    So what version of MVC2 is in VS10B2? Preview2? - I'm thinking shall I go with RC on VS2008 or whatever version is in VS2010?

  24. Avatar for Eilon Lipton
    Eilon Lipton December 16th, 2009

    Visual Studio 2010 Beta 2, which is the most recent public version of VS2010, contains ASP.NET MVC 2 Preview 2.
    The out-of-band standalone releases of ASP.NET MVC 2 for Visual Studio 2008 SP1 are not compatible with VS2010 and also cannot be installed on the same computer. For the time being you'll either have to pick whether you want to use VS2008 or VS2010 or you can use a virtual machine and run one inside the VM and one outside (or whatever).
    We realize that this is an unfortunate situation but once everything gets to its final release (VS2010, .NET 4, and ASP.NET MVC 2) they will all be compatible with each other and can be installed on the same computer.

  25. Avatar for Rob Conery
    Rob Conery December 17th, 2009

    "slated for some time in March"
    Now I have a big reason to go to MIX :). Big hugs for you and the gang...

  26. Avatar for Rickj1
    Rickj1 December 17th, 2009

    I finished raising kids I know what your goin thruogh TRY SOY MILK
    believe me happy baby

  27. Avatar for BuzzBox
    BuzzBox December 17th, 2009

    @Eilon Lipton
    What is, please, a version number of the RC DLL?
    Also, as far as I know, I can still develop an application in VS10Beta2 and manually reference the new RC DLL? Or it will not compile within .NET 4 at all?
    If I already have VS2010Beta 2 installed, I have to remove it to install MVC2 RC?

  28. Avatar for Drazen Dotlic
    Drazen Dotlic December 17th, 2009
    The other change related to validation is that the ValidationSummary now supports overloads where only model-level errors are displayed.

    Excellent! I ran into this issue the other day and was wandering how to solve it.
    Is there a way today with ASP.NET MVC 1.0 to get this kind of behavior?

  29. Avatar for Richard Kimber
    Richard Kimber December 17th, 2009

    This is really good news, I'm just gutted that I can't feel the benefits on VS2010. I'm now using 2010 exclusively for new projects.

  30. Avatar for Khalid Abuhakmeh
    Khalid Abuhakmeh December 17th, 2009

    I agree with Richard Kimber. I can't help but feel like Microsoft is forgetting about the people getting their VS2010 groove on. I know you guys are busy, but please please please get us an update for VS2010 or help us understand how we can update our current VS2010 projects to use the new goodness.

  31. Avatar for Jason Alexander
    Jason Alexander December 17th, 2009

    Awesome! Nice work to you and team... can't wait to hack on it!

  32. Avatar for Ec
    Ec December 17th, 2009

    If there is source, then we could compile it for .NET4?:)

  33. Avatar for Eddy Recio
    Eddy Recio December 17th, 2009

    @Haacked and @Eilon,
    Please keep up the good work! And whatever you do, DO NOT let all the silly questions about having the team support every possible VS Beta in lieu of shipping bits or diverge from your current release process. I really dont understand why you guys receive the same question time and time again.
    Again, keep up the great work. Some of us understand :)

  34. Avatar for Atilla Yadik
    Atilla Yadik December 17th, 2009

    What a cute baby! Very nice picture. I was lol as soon as I saw.

  35. Avatar for Dmitry Fedorov
    Dmitry Fedorov December 17th, 2009

    Cool to hear this news! Thanks!

  36. Avatar for Richard Kimber
    Richard Kimber December 17th, 2009

    The Gu has confirmed that the RC of VS2010 will get an MVC2 refresh. Keep up the good work, VS2010 and MVC2 is the most (coding) fun I've had in years.

  37. Avatar for Mike Paterson
    Mike Paterson December 17th, 2009

    I think a "poo explosion" is technically called a #3.
    If you don't want to click on the link then google "poo explosion #3 commercial"

  38. Avatar for Soe Tun
    Soe Tun December 18th, 2009

    No it is not broken. At first, that's what I thought also.

    When I look at the RC assembly using the .NET Reflector tool, the JavaScript metadata generation code is totally different from the web browser's "View Source".
    The web application was somehow using the "cached" version of the MVC 2.0 **Beta** assembly.

    Here is how to fix it.
    ==== 1 ====
    Shutdown IIS Windows Service.
    Close all running Visual Studio instances.
    ==== 2 ====
    Clean the ASP.NET Temporary folder by deleting all your MVC WebApp folders.
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files
    ==== 3 ====
    Delete the "bin" folder content in your MVC Web App from Windows Explorer.
    ==== 4 ====
    Restart IIS and Visual Studio.
    Rebuild the MVC Web App.
    ==== 5 ====
    Make sure you are using the *NEWEST* MicrosoftMvcJQueryValidation.js file from the {MVC2-RC Source Code}\src\MvcFutures\ folder.
    ==== 6 ====
    Remove this code because "ClientValidationFunction" property does not exist anymore.
    <% ViewContext.FormContext.ClientValidationFunction = "EnableClientValidation"; %>

    Hope it helps,

  39. Avatar for Soe Tun
    Soe Tun December 18th, 2009

    What is now broken is the JSON metadata generated is treating <input type="checkbox" /> as required because the *Database Column* is a not-nullable [bit] column.
    So, for all CheckBox input controls with a not-nullable Boolean property, we cannot submit the FORM unless we check the CheckBox.

  40. Avatar for Steve
    Steve December 19th, 2009

    Couldn't get multi-project area to work even with MVC Futures. Any sample/ideas please?

  41. Avatar for John C
    John C December 19th, 2009

    @Soe Tun: Confirmed - I can duplicate this too...

  42. Avatar for Chad Moran
    Chad Moran December 19th, 2009

    Great job Phil and Co, thanks a lot.

  43. Avatar for haacked
    haacked December 19th, 2009

    Hi All,
    I posted a follow-up post that addresses Visual Studio 2010 support for ASP.NET MVC 2.

  44. Avatar for Simon W
    Simon W December 21st, 2009

    Looks like I need to include MicrosoftAjax.js now for MicrosoftMvcJQueryValidation.js even though it only requires one tiny tiny piece.
    Tried to report on connect but i always get really confused and lost so mentioning it here.
    See also

  45. Avatar for Galilyou
    Galilyou December 22nd, 2009

    Awesome! Nice work Phill. Feels like you will catch up with vs10 deadline after all, good job.

  46. Avatar for Deep
    Deep December 27th, 2009

    Dear Phill,
    We just started [one month back] one new project using MVC 2 RC [using VS2008 SP1], but are facing lot of problems in doing the basic stuff which earlier was pieces of cake. Some of the issues we are facing:
    Handling Session [though we are doing but not sure the best way]
    Validation of controls while Updating records [its fine while insert]
    Validation [in Insert] for Optional Integer data type
    Multilingual [we were quite happy with simple resource files, but now not sure how to do]
    There are many sample projects on MVC 1 are available for learning, but nothing that we saw is for MVC 2. Will be great if you give some pointers to the one doing all basic stuff in MVC 2.
    Thanx & Regards,

  47. Avatar for Deep
    Deep January 3rd, 2010

    Dear Phill,
    I know the holidays are going on :-) but just wanted to inform that we have settled most of the issues, except for the "Validation of controls while Updating records [its fine while insert]"

  48. Avatar for Yasir Atabani
    Yasir Atabani January 3rd, 2010

    Well done, I hope now I can convince my client to start using MVC. Although the learning curve for the team will be an issue.
    Baby don't RC at me, I got the MVC for you

  49. Avatar for unicaja
    unicaja January 8th, 2010

    good job, Thanks;)

  50. Avatar for Ales Golli
    Ales Golli January 10th, 2010

    Mark, Steve,
    Does VS show the "Add Area..." option if you create a new MVC project? Is the "Add Area..." option missing only in your old projects?
    ...then maybe you didn't upgrade the old projects properly.
    You have to "Open the project file (the file with the .csproj or .vbproj file extension) and locate the ProjectTypeGuid element. In the value of that element, replace the GUID {603c0e0b-db56-11dc-be95-000d561079b0} with {F85E285D-A4E0-4152-9332-AB1D724D3325}." (RTF-release-notes) :-)

  51. Avatar for Hitesh Agja
    Hitesh Agja April 4th, 2012

    Nice video. Very well explained. I have also created demo on MVC 2 step by step. Just refer this link. May it will help others.