不能在某个项目打开任何文件CSHTML [英] Cannot open any CSHTML file in a certain project
问题描述
当我打开一个特定的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屋!