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 ran into this issue with a Web Application - my .cshtml files got stuck on the System.Web.WebPages.WebViewPage base class when I needed the System.Web.Mvc.WebViewPage.
First, ensure your ~/Views/web.config file has the correct pageBaseType. In my case, I set to System.Web.Mvc.WebViewPage.
Then, importantly, some people have found this is key if the above is already good:
.user file that Visual Studio generated next to the project. For VS2015, the .user and .sln files have moved to the .vs hidden folder that is created next to the .sln file. However, from comments below, the error messages imply to me that the tooling is using the wrong version of MVC entirely, and deleting this folder does not fix the issue. To my knowledge, there is not a known solution.