ASP.NET MVC 3 Release Candidate 2, mvc, nuget, code 0 comments suggest edit

Almost exactly one month ago, we released the Release Candidate for ASP.NET MVC 3. And today we learn why we use the term “Candidate”.

As Scott writes, Visual Studio 2010 SP1 Beta was released just this week and as we were testing it we found a few incompatibilities with it and the ASP.NET MVC 3 RC that we had just released.

newdotnetlogo_2That’s when we, in the parlance of the military, scrambled the jets to get another release candidate prepared.

You can install it directly using the Web Platform Installer (Web PI) download the installer yourself from from here.

Be sure to read the release notes for known issues and breaking changes in this release. I’m not saying I put an Easter egg in there or not, but you’ll have to read all the notes to find out.

In particular, there are two issues I want to call out.

Breaking Change Alert!

The first is a breaking change. Remember way back when I wrote about Dynamic Methods in ViewData? Near the end of that post I wrote an Addendum about the property name mismatch between ViewModel and View.

Well we finally resolved that mismatch. The new property name, both in the controller and in the view is ViewBag. This may break many of your existing ASP.NET MVC 3 pre-release applications.

NuGet Upgrade Alert

The other issue I want to call out is that if you already have NuGet installed, running the ASP.NET MVC 3 RC 2 installer will not upgrade it. Instead, you need to go to the Visual Studio Extension Manager dialog (via the Tools | Extensions menu option) and click on the Updates tab. You should see NuGet listed there (click on image for larger image):


The NuGet.exe command line tool for creating packages is available on CodePlex.

Overall, this release consists mostly of bug fixes along with some fit and finish work for ASP.NET MVC 3. We’ve updated the version of jQuery and jQuery Validation that we include in the project templates and now also include jQuery UI, a library that builds on top of jQuery to provide animation, advanced effects, as well as themeable widgets.

In terms of NuGet, this release contains a significant amount of work. I’ll try and follow up soon with more details on the NuGet release along with release notes.

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



51 responses

  1. Avatar for Still off for me
    Still off for me December 10th, 2010

    The download link still off for me :(

  2. Avatar for Marcus Wendt
    Marcus Wendt December 10th, 2010

    Will the source code for the RC become available? I can only find beta sources at

  3. Avatar for Paul
    Paul December 10th, 2010

    ViewBag??? ... mmmmm

  4. Avatar for haacked
    haacked December 10th, 2010

    @Still off for me. I updated the link to point directly to the installer temporarily. The download page is still propagating. I apologize. I thought it had propagated but I was looking at the wrong one. :(
    @Marcus yes, we'll try to get the source up soon.

  5. Avatar for Justin Burns
    Justin Burns December 10th, 2010

    The release notes still refer to "NuPack". Where's the NuGet-y goodness? :)

  6. Avatar for Bob
    Bob December 10th, 2010

    Do I need to uninstall MVC 3 RC before installing MVC 3 RC 2?

  7. Avatar for sirmak
    sirmak December 10th, 2010

    Did you solved the huge performance issue in this release (in mvc 3 rc1, speed was half of the mvc 2) ?

  8. Avatar for sirmak
    sirmak December 10th, 2010

    Hi, here is a link about this issue:

  9. Avatar for Bats Ihor
    Bats Ihor December 10th, 2010

    Renaming ViewModel and View to the ViewBag it's very good news, but why did you choose this name? Why not ViewModel?
    sorry for bad English I am form Ukraine...

  10. Avatar for Brian Vallelunga
    Brian Vallelunga December 10th, 2010

    Is there a way to install this with WPI?

  11. Avatar for Asbjørn
    Asbjørn December 10th, 2010

    Just a note on installation. I had it fail on vs10-kb2465236-x86.exe for no apparent reason. The log file didn't say anything more than a serious error occured. However, once I opened the update by itself, it became apparent that it wanted to access the VS2010 installation disc (or in my case, ISO image). On it did so, it installed with no issues. And so did the rest of MVC3.

  12. Avatar for James
    James December 10th, 2010

    NuGet currently fails at the one thing it tries to solve. When the hell are all the packages going to be updated? Still no NH3.0/Fluent-NH3.0, it's still beta/rc on there.

  13. Avatar for rekna
    rekna December 10th, 2010

    I have a problem since MVC3 RC2...
    The values that are posted to my controller method are
    My controller method accepts parameters (string van, int? soort, bool? FormSearch). van and FormSeach contain the expected values, but soort appears to be null...??? with RC1 this was working as expected.

  14. Avatar for Alexander Taran
    Alexander Taran December 10th, 2010

    is vs2010 sp1 beta required?

  15. Avatar for haacked
    haacked December 10th, 2010

    Hi All, You do not need to uninstall ASP.NET MVC 3 RC before installing RC 2. VS 2010 SP 1 Beta is not required for MVC 3 RC 2. You can install it on VS 2010 without SP1 Beta.
    @James You'll have to talk to the NHibernate owners.

  16. Avatar for Hajan
    Hajan December 10th, 2010

    Great job guys! I've read the ScottGu's blog today. You have included some cool stuff in the RC 2. The installation and everything else passed good for me. However, I just saw in the forums a user have reported problem with the Nullable parameters sent to the Controller's method. See the forum post here:

  17. Avatar for sirmak
    sirmak December 10th, 2010

    Hi, I have benchmarked again and found that, there isn't any performance problem with mvc 3 aspx pages now, but a big performance hit exits with the razor templating (approximitaly twice).

  18. Avatar for Hem Talreja
    Hem Talreja December 11th, 2010

    In RC1 I was unable to get areas working with DI, is it possible to post a simple sample using mvc3, nhibernate or entity, unity + areas?

  19. Avatar for sirmak
    sirmak December 11th, 2010

    Thanks to Marcind, he helped me to find out that there is no performence issue in mvc 3, it was my benchmarking issue as you can see here
    Excellent job!

  20. Avatar for rekna
    rekna December 11th, 2010

    Concerning the bug I posted (ASP.NET forums ( with the nullable int parameter, this has been confirmed to be a bug introduced in RC2 and in the same post is mentioned a workaround that solves the problem for now

  21. Avatar for Felix
    Felix December 12th, 2010

    I wonder if there are plans to put source code on codeplex? Beta is obviously obsolete; and RC1 was skipped. What about RC2?

  22. Avatar for Mike
    Mike December 12th, 2010

    Installation failed with a nondescript error message:
    Exe (d:\temp\ext6142\VS10-KB2465236-x86.exe) failed with 0x80070643 - Fatal error during installation.
    PerformOperation on exe returned exit code 1603 (translates to HRESULT = 0x80070643)
    Error 1603 is mapped to Custom Error:
    OnFailureBehavior for this item is to Rollback.
    Final Result: Installation failed with error code: (0x80070643), "Fatal error during installation.
    " (Elapsed time: 0 00:00:16).

  23. Avatar for David
    David December 12th, 2010

    As iam a leaner of, this MVC 3 Release Candidate concept is new to me. What you have explained is very nice even then i need some more detailed explanation.Keep posting. Thanks for a nice tutorial.

  24. Avatar for Cassio R Eskelsen
    Cassio R Eskelsen December 12th, 2010

    Hi Phil!
    I had installed the Async Framework as soon as it was announced at the PDC. When installing the Asp.Net MVC 3 RC 1 I had the problem of lack of compatibility with the Async Framework and uninstalled it, thus installing the RC 1. Now when you install RC 2, I get the following message:
    "Blocking Issues:
    This product is Incompatible with the Microsoft Visual Studio CTP Async. Please uninstall the component, then try to install this product again.
    You know what I could do to force the installation?

  25. Avatar for Slava
    Slava December 12th, 2010

    Very good news.

  26. Avatar for Stacey
    Stacey December 12th, 2010

    I have to agree with an earlier post - why 'ViewBag' instead of just 'ViewModel'?

  27. Avatar for Upupto
    Upupto December 13th, 2010

    why not use 'Page'

  28. Avatar for ashic
    ashic December 13th, 2010

    What's this fixation on the word "View"? ViewBag seems a bit weird...why not call it simply "Data" in both the controller and the view?

  29. Avatar for Adam
    Adam December 13th, 2010

    @philhaack: You're skirting the issue. Just make "ViewData" a dynamic dictionary. I'm sure it's painful, probably more for the MVC team than most of us, but it's the only way everybody will be happy. I've made some really big projects using MVC (ones I don't really want to have to change.) But everytime you release a new version of MVC, I have to make changes. dynamic ViewData. Just do it. You'll feel better afterwards.

  30. Avatar for hazzik
    hazzik December 13th, 2010

    class dao { string SomeValue; }
    class childDao : dao { }
    <%= Html.Editor("SomeValue") %> -- there ModelType is childDao
    <%= Html.EditorFor(x=>x.SomaValue) %> -- there ModelType is dao

  31. Avatar for MJ
    MJ December 13th, 2010

    ViewBag? Come on... of course you can come up with a better property name than that.

  32. Avatar for lgm
    lgm December 14th, 2010

    I don't understand why but the quickfix with autoFormsAuthentication does not work anymore since the RC2 :(
    I'm still redirected to /Account/Login which does not exists for me.
    I thought it would be fixed for the RC2. did I miss something?

  33. Avatar for haacked
    haacked December 14th, 2010

    @Adam that would break all extension methods on the ViewDataDictionary for everyone.
    @Igm Could you provide more details? I'm not able to reproduce this on a brand new MVC 3 project. Do you still have references to WebMatrix.Data and/or WebMatrix.WebData? Those references are no longer needed.

  34. Avatar for Gideon Israel
    Gideon Israel December 14th, 2010

    Hey! Im working on a slightly big project and part of it is a web app.
    I decided to go with mvc and got the books I started playing with mvc2. I seriously LOVE razor, just the look of it, haven't downloaded MVC3 yet.
    My question: Would it be safe to use mvc3 RC2 for my project? I dont want to use mvc2 then upgrade, but I will have to make a iterative release on Jan 1 for my project. Will the RTM come by then? Also, Im assuming going from RC2 to RTM won't really be a problem!?

  35. Avatar for Adam
    Adam December 14th, 2010

    Thanks for the reply. I didn't know there were extension methods for ViewDataDictionary (other than the LINQ ones.) What do these do?
    (I'm still convinced you wont be fulfilled until ViewData is dynamic, despite the havock it will cause. But that is your call, and it isn't why I'm asking about the extension methods. I just wonder where they are and what they do so I can start using them.)

  36. Avatar for Haddy
    Haddy December 15th, 2010

    I hear a lot of complaining... and very little appriciation. Thans Phil, and the rest of the MVC team for making this happen and putting the time and resources forward to continue to expand the project. MVC, I feel, is the best thing to happen to .NET for a while. I love it, and I don't think I'll ever go back to webforms for any of my own projects.
    As far as the naming... no name is perfect, nor can they please everyone. Viewbag... eh, might be considered slander in some states lol... but anyways, good luck finding a name everyone agrees on.

  37. Avatar for richy r.
    richy r. December 16th, 2010

    I agree with Adam, ViewData actually would be a perfect name. But you are right, MVC3 and inparticular Razor is amazing. Well done Haack!
    I don't think there are any inbuilt ViewData extension methods. There are plenty of examples on the internet where people have made custom extensions. Say if you had an extension method that creates a select list.
    Html.DropDownList("FooId", ViewData.BuildSelectList("Stuff"));
    You cannot make dynamic extension methods. If you use strongly typed view-models, you'll never come across this. But you could always push the method into the view data (seperate the concern by putting this population in a different place.)
    The big selling point for me about MVC (and I know this goes for alot developers) is that MVC is tidy. For that we have alot to be greatful to you for. Webforms seem overtop and cluttered with a number of features that do the same thing. Please keep MVC tidy.
    I vote for onward and upward. I agree with Adam, it's not the only breaking change we've had the endure. I do also agree with Haddy, well done, you've put together some excellent work.

  38. Avatar for Gideon Israel
    Gideon Israel December 16th, 2010

    @Richy so true about the tidy-ness. Somewhere I read, doing a data driven app in web forms is a breeze but you might miss that in mvc.
    NO I dont! The DataAnnotation, the automatic client side validate and the scaffolding make MVC so much faster and cleaner as opposed to forms!

  39. Avatar for Adam
    Adam December 16th, 2010

    MVC3 is brilliant. I think rich has hit the nail on the head. I like MVC because it's clean. ViewBag seems to make it messy and it feels like it has been added with much reluctance.
    I do use strongly-type view models. I think though that using methods in a dynamic object is also messy, especially since extension methods are used everywhere now (not least with Ajax, Html and Url helpers.) But then dynamic typing doesn't really fit into that way of doing things.

  40. Avatar for ashic
    ashic December 16th, 2010

    Erm...why aren't we calling it simply "Data" in both the controller and the view again? What's the "View" prefix doing? If it's not a viewresult and we wished to pass dynamic data to a different type of "ActionResult", would we still call it "ViewBag"? Simply calling it "Data" would result in:
    1. Less typing.
    2. Be applicable to any ActionResult.
    3. Convey all intent necessary.
    4. Won't sound as silly as Bag or Purse...
    Erm...why aren't we calling it simply "Data" in both the controller and the view again?

  41. Avatar for Vlad
    Vlad December 16th, 2010

    Html.EditorFor doesn't consider RequiredAttribute inherited classes for client side validation
    I want to localize the error message for the Required attribute and store it in the database. For this purpose I created a custom class LocalizedDisplayNameAttribute the inherits DisplayNameAttribute and overrides the DisplayName property. Everything is ok server side where the Model.IsValid returns what it should and the Html.ValidationSummary correctly displays the localized text from the class LocalizedDisplayNameAttribute, however the method Html.EditorFor doesn't generate the needed items for client side validation.
    This seems to be a big bug!
    I opened a bug in Codeplex:

  42. Avatar for Martin
    Martin December 17th, 2010

    Is there an Mvc Futures available for the MVC 3 RC 2 ?

  43. Avatar for People Skills
    People Skills December 17th, 2010

    This is good news. Visual studio is one of my favorite applications. Last post: how to be charismatic

  44. Avatar for Cincherg
    Cincherg December 18th, 2010

    Wonderful web-site, in which did you observed this facts in this article? I am glad I observed it. i will be checking out back soon to check what other articles or blog posts you may have.

  45. Avatar for Bharat Patel
    Bharat Patel December 19th, 2010

    I migrated my test app from MVC2 to MVC3 and seeing some wierd issues with the TryUpdateModel. It was working fine but after upgrading it is not updating the collection of objects.
    Following is the sequence:
    TryUpdateModel for Order and it successfully updates the model and return false.
    2nd TryUpdateModel for the collection of order items and it works fine and returns false.
    3rd TryUpdateModel for collection of payment items and it does not update the model.
    What is the issue here? It used to work fine in MVC2. Do I have to reconsider this using different approach in MVC3?
    Here is Question on StackOverflow:

  46. Avatar for Adam
    Adam December 20th, 2010

    ViewPurses go inside ViewBags.
    Can you imagine the controller having to find it for every request?
    It would have to get out the ViewMakeup, ViewLipstick, ViewHairBrush and it would just p*ss aload of people off.

  47. Avatar for Zain Shaikh
    Zain Shaikh December 22nd, 2010


  48. Avatar for Igorbek
    Igorbek December 25th, 2010

    At the moment, Razor does not allow nesting inline templates. For, ex:

    Sites: @item.Sites.RenderList(@< a href="@item">@item, separator: ", "))
    Exception: Razor does not allow nested inline templates.
    Of course, it is not possible, it makes an 'item' identifier conflict.
    Are you planning to allow nested inline templates in the next versions of Razor?
    May be possible to provide syntax like this:
    @<tag>...</tag> - one typeless parameter named 'item', by default
    @[param]<tag>...</tag> - one typeless parameter named 'param' (no conflict with item)
    @[Type param]<tag>...</tag> - one typed parameter named 'param'
    @[Type param, ...]<tag>...</tag> - multiple parameters
    Thanks for a time!

  49. Avatar for FS
    FS January 4th, 2011

    Please change the ViewBag name! This is a horrible name!

  50. Avatar for Dave
    Dave January 5th, 2011

    ViewBag is in fact a very good name for it. Collections can be stored in terms of sets, bags or lists. Each collection type has it's own usage.
    Bag: Unordered list of entities, duplicates allowed.
    Set: Unordered list of unique entities, duplicates not allowed
    List: Ordered collection of entities, duplicates allowed

  51. Avatar for John
    John January 28th, 2011

    Is it possible to disable global action filters for a single action?