asp.net-mvc - Visual Studio 2013 无法打开 Razor View - 'The operation could not be completed'

标签 asp.net-mvc razor visual-studio-2013

我正在打开一个旧的 WebForms 项目并尝试在 Visual Studio 2013 中将其更新为 ASP.NET MVC 4。当我添加一个新项目时,我可以运行它并且一切正常。

当我尝试打开 Razor View (cshtml 文件)时,VS2013 给了我通用的“操作无法完成”。错误消息,不会打开它们。

如果我创建一个不在 WebForms 解决方案内的新项目,它会很好地打开 View 。

如果我右键单击该文件并选择“打开方式”和“HTML(Web 表单)编辑器”,它会打开但没有突出显示 Razor 语法。

是什么赋予了?

最佳答案

对我来说,我必须修复网页:appSettings 中的版本设置。对我来说,值中有一种类型。确保它是 3.0.0.0。

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

关于asp.net-mvc - Visual Studio 2013 无法打开 Razor View - 'The operation could not be completed',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20428896/

相关文章:

visual-studio - 关闭 ReSharper 异常浏览器

c# - 将 UserManager.FindAsync 与自定义 UserStore 结合使用

asp.net-mvc - 在ASP.NET MVC中,如何将xml文档返回到 View

c# - 将站点的手动版本号添加到 web.config

c# - 应用找不到位于另一个项目中的 Razor 页面

c# - 使用由 MEF 加载的模型类型的 ASP.Net MVC View 导致 View 构建器中的 JIT 编译错误

asp.net-mvc - httpcontext 当前服务器映射路径显示 c :\inetpub\wwwroot when the current location is somewhere else

asp.net-mvc - MVC4中根据条件动态加载布局

windows - Visual Studio 2013 在打开解决方案 : has stopped working Visual Studio use in-Time-Debugger 时崩溃

visual-studio-2012 - 在 vs 2012 中打开项目时找不到 microsoft.typescript.default.props