Today I decided to sit down and upgrade the Dimecasts.net code to run on MVC preview 4. To be honest I did not know exactly what to expect, and I have to say, it was kinda painful but not too bad.
Let me first start off by saying this. Anyone that decides to build a production application of any size on a Technology Preview must be willing to accept breaking changes between releases. Please do not take this post as me 'bitching' or 'complaining'. This post is just to help others that may be about to do the same thing.
You can get the list of changes and the readme from here.
You can get other information about the MVC framework from codeplex or asp.net.
Ok, on to the issues I ran into.
|Problem: ||Assemblies not being correctly referenced. The first hurdle I ran into was that VS did not want to accept my new MVC assemblies. For some reason even though I had added them as a reference they were not being dropped into the bin directory.|
|Solution: ||All I needed to do was remove all the files from the bin in the solution and the Reference_Dependencies folders|
|Problem: ||The MVC team renamed RenderView to View|
|Solution: ||Global find and replace|
|Problem: ||Had to update the web.config because the version on System.Web.Abstractions and System.Web.Routing had changes|
|Solution: ||Find the few spots in the file and change the version from 18.104.22.168 to 0.0.0.0.|
I was told by Chris Sutton that this was done with intent because SP1 of .Net 3.5 was about be released and the team did not want there to be any version issues.
|Problem: ||All my viewdata references stopped working. I have used the strongly typed ViewData feature a ton with MVC and all my references to it broke.|
|Solution: ||Prior to preview 4 I could do something like this in my codebehind:|
Now you need to do this:
The change for this makes since, but it was a pretty painful change.
That about does it for my pain points in upgrading to preview 4. I now need to spend some time giving the site a good run though to ensure I did not miss something. Then it is off to gork all the new features and figure out how to use them :)
Till next time,
[----- Remember to check out DimeCasts.Net -----]
07-26-2008 1:30 PM