Visual Studio 2013 can't open Razor views - 'The operation could not be completed'

asp.net-mvc, razor, visual-studio-2013

Solution

For me, I had to fix the webpages:Version setting in appSettings. For me, there was a type in the value. Make sure it's 3.0.0.0.

<appSettings>
    <add key="webpages:Version" value="3.0.0.0" />
...

Problem

I am opening an older WebForms project and trying to update it to ASP.NET MVC 4 in Visual Studio 2013. When I add a new project I can run it and everything works fine. When I try to open up the Razor views (cshtml files) VS2013 gives me the generic 'The Operation could not be completed.' error message and won't open them. If I create a new project not inside of the WebForms solution it opens the views fine. If I right-click the file and choose 'Open with' and 'HTML (Web Forms) Editor' it opens up but without the Razor syntax highlighted. What gives?

Original source

Related problems