I am in the process of upgrading to MVC4. I have followed the instructions at http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253806 but in my Razor views and layou
I had the same issue when updating to MVC 5 and it was solved by updating the web.config inside the Views folder.
The host -> factoryType was set to version:4.0.0.0 hope this helps anyone.