Visual Studio 2012 and Razor 1.0 (opening an older project in 2012)

VisualStudio 2012 assumes we are using the latest and greatest (version 2) when it comes to the Razer view engine. However when we are opening a project that was created using version 2010 then we were using 1.0 and that is the reason that 2012 is telling us about all the errors it believes we have with our project.

The solution is to edit the web.config file and under “appSettings” tell VisualStudio that this project is using version 1.0

<add key="webpages:Version" value="1.0" />