Updating an ASP.NET MVC App to Preview 2

There’s a whole lot of ground not covered in the official update instructions.

The MVC Web UI helpers are now in the framework. But they’ve changed quite a bit. So you must:

  1. Remove the assembly from your project.
  2. UpdateFrom is no longer an extension method. It’s now a static method in System.Web.Mvc.BindingHelperExtensions. So you have to change anywhere you called that.
  3. Just to keep you on your toes, System.Web.Mvc.BindingHelperExtensions will probably be renamed soon.
  4. RedirectToAction is now in System.Web.Routing. Edit your controllers.
  5. RedirectToAction now takes a RouteValueDictionary instead of an anonymous type. You can stuff your old anonymous type into the constructor for RouteValueDictionary.
  6. If you have unit tests you have to update that project, too. In a big way. All that stuff Phil Haack had on his blog as a download a while back is now in the framework. IHttpContext is now HttpContextBase. I’m still figuring this stuff out. I may have to rebuild the unit tests from scratch.

I think it’s fair to say that the unit test portion of MVC is in even greater flux than the rest of the framework at present.

Posted by Craig Stuntz on March 12th, 2008 under Web, .NET, C# |


Leave a Comment


Server Response from: dnrh1.codegear.com

 
© Copyright 2008 Embarcadero Technologies, Inc. All Rights Reserved. Contact Us  |   Site Map  |   Legal Notices  |   Privacy Policy  |   Report Software Piracy