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?
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" />
...
In my case, I had a syntax error in my web.config file, which was because of a source control update issue. When I fixed the web.config file, everything got fine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With