不能在某个项目打开任何文件CSHTML [英] Cannot open any CSHTML file in a certain project

查看:296
本文介绍了不能在某个项目打开任何文件CSHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开一个特定的ASP.NET MVC项目CSHTML文件时,Visual Studio 2013崩溃。

我可以在这个项目中打开其他文件,我可以在其他项目打开CSHTML文件。

我和其他计算机上的这个项目不麻烦同事的工作。

我已经从我的计算机中删除整个项目,从我们的Git回购克隆的一个新的副本具有相同的结果。

任何线索?

编辑:

我回顾了Windows日志,发现以下错误:


  

应用:devenv.exe的Framework版本:v4.0.30319说明:
  过程由于未处理的异常终止。异常信息:
  System.ArgumentException堆栈:在
  System.String.CompareTo(System.Object的)在
  System.Web.Razor.Parser.RazorParser.ParseCore(System.Web.Razor.Text.ITextDocument)
  在
  System.Web.Razor.Parser.RazorParser.Parse(System.Web.Razor.Text.ITextDocument)
  在
  System.Web.Razor.RazorTemplateEngine.Generate codeCore(System.Web.Razor.Text.ITextDocument,
  System.String,System.String,System.String,
  System.Nullable`1)在
  System.Web.Razor.Editor.BackgroundParser+BackgroundThread.ParseChange(System.Web.Razor.Text.ITextBuffer,
  System.Threading.CancellationToken)在
  System.Web.Razor.Editor.BackgroundParser + BackgroundThread.WorkerLoop()
  在System.Threading.ThreadHelper.ThreadStart_Context(System.Object的)在
  System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext,
  System.Threading.ContextCallback,System.Object的,布尔)在
  System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
  System.Threading.ContextCallback,System.Object的,布尔)在
  System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext,
  System.Threading.ContextCallback,System.Object的)在
  System.Threading.ThreadHelper.ThreadStart()



解决方案

我终于改变解决了这个

 <添加键=网页:版本值=2.0.0.0/>

 <添加键=网页:版本值=3.0.0.0/>

在Web配置。

When I open a CSHTML file in one specific ASP.NET MVC project, visual studio 2013 crashes.

I can open other files in this project and I can open CSHTML files in other projects.

I and a coworker work with this project on other computers without trouble.

I've deleted the entire project from my computer and cloned a fresh copy from our Git repo with the same results.

Any clues?

EDIT:

I reviewed the windows logs and found the following error:

Application: devenv.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ArgumentException Stack: at System.String.CompareTo(System.Object) at System.Web.Razor.Parser.RazorParser.ParseCore(System.Web.Razor.Text.ITextDocument) at System.Web.Razor.Parser.RazorParser.Parse(System.Web.Razor.Text.ITextDocument) at System.Web.Razor.RazorTemplateEngine.GenerateCodeCore(System.Web.Razor.Text.ITextDocument, System.String, System.String, System.String, System.Nullable`1) at System.Web.Razor.Editor.BackgroundParser+BackgroundThread.ParseChange(System.Web.Razor.Text.ITextBuffer, System.Threading.CancellationToken) at System.Web.Razor.Editor.BackgroundParser+BackgroundThread.WorkerLoop() at System.Threading.ThreadHelper.ThreadStart_Context(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart()

解决方案

I finally resolved this by changing

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

to

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

in the web config.

这篇关于不能在某个项目打开任何文件CSHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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