As my previous post shows I recently installed MVC 4 on my development machine. I ran into an annoying gotcha by doing this.
I have an MVC 3 app that I maintain and I needed to make a small change to a previous version of the app in our test environment. I should have been pretty straight forward. I branched my in progress changes, updated to the version in test, made the change and rebuilt the app. Then I pushed the new dlls to the server, assuming everything would work.
To my surprise I was getting exceptions in previously working code. Turns out the MVC 4 install updated the System.Web.Helpers dll in the GAC. This caused my project to now have a dependency on this new version. The fix was pretty straight forward, I just set the “copy local” flag in the project reference, rebuilt and pushed that dll to server. I also need to update the web.config to reflect the dependency on this version.
<add assembly="System.Web.Helpers, Version=184.108.40.206, Culture=neutral" />