VS2013 - 操作无法完成 [英] VS2013 - Operation Could Not Be Completed

查看:26
本文介绍了VS2013 - 操作无法完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装 Visual Studio 2013 并试用一些新功能后,我注意到我无法在我的 MVC 项目之一中打开 cshtml 文件.如果我尝试在默认的 html 编辑器中打开它,我会收到以下错误

After installing Visual Studio 2013 and playing around with some of the new features, I noticed I'm unable to open a cshtml file in one of my MVC projects. If I try opening it in the default html editor, I'm receiving the following error

无法完成操作

在另一个编辑器 IE:HTML (Webforms) 编辑器中打开文件,打开文件没有任何问题.所以这似乎是默认 Html 编辑器的问题.

Opening the file in another editor, IE: HTML (Webforms) Editor, opens the file without any issue. So it seems to be an issue with the default Html Editor.

关于如何解决以前版本的 VS 中的这个问题,我遵循了各种建议.如果我删除所有解决方案的.suo"文件,并重新启动 Visual Studio,错误将更改为:

I've followed various suggestions for how to combat this problem from previous versions of VS. If I delete all the solution's ".suo" files, and restart Visual Studio, the error changes to:

未将对象引用设置为对象的实例

Object reference not set to an instance of an object

一旦 Visual Studio 创建了一个新的.suo"文件,错误消息就会恢复到上一个​​.

Once Visual Studio creates a new ".suo" file, the error message reverts back to the previous one.

我尝试在 VS2013 上进行修复安装,但是我仍然遇到相同的问题.此外,在安全模式下运行 VS 也不起作用.我尝试创建一个新的 MVC 项目,但在创建过程中失败了.对于任何这些错误,Windows 事件日志不包含任何消息.

I've tried doing a repair install on VS2013, however I'm still running into the same issues. Also, running VS in Safe-Mode did not work either. I tried creating a new MVC project, which failed during creation. With any of these errors, the windows event log does not contain any messages.

有没有其他人遇到过这个问题?

Has anyone else had this problem?

推荐答案

我刚刚想通了.在我的 web.config 中,我的

I just figured it out. In my web.config, I had the following in my

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

将此值更改为3.0.0.0"解决了问题.我在 VS2010 或 VS2012 上从来没有遇到过这个问题.IDE 中似乎有些东西没有很好地处理这个问题.

Changing this the value to "3.0.0.0" resolved the issue. I never had a problem with this on VS2010 or VS2012. It seems there is something in the IDE that is not handling this gracefully.

这篇关于VS2013 - 操作无法完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆