简体   繁体   中英

Visual Studio 2015 (Update 1) crashes when triggering IntelliSense in cshtml editor

Whenever I open a View file and type something that trigger IntelliSense (<, . or Ctrl + Space), VS immediately crashes without any message and suggest to restart itself.

I opened Event Viewer and see two Error records:

Application: devenv.exe Framework Version: v4.0.30319 Description: The application requested process termination through System.Environment.FailFast(string message). Message: System.AggregateException: One or more errors occurred. ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: position at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32 position, Boolean findInsideTrivia) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32 position, Func`2 findInsideTrivia) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindToken(Int32 position, Boolean findInsideTrivia) at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode.FindTokenCore(Int32 position, Boolean findInsideTrivia) at Microsoft.CodeAnalysis.CSharp.Extensions.SyntaxTreeExtensions.IsEntirelyWithinStringLiteral(SyntaxTree syntaxTree, Int32 position, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Extensions.SyntaxTreeExtensions.IsInNonUserCode(SyntaxTree syntaxTree, Int32 position, CancellationToken cancellationToken) at Microsoft.CodeAnalysis.CSharp.Completion.Providers.SpeculativeTCompletionProvider.d__3.MoveNext() --- End of stack trace from previous location where exception was thrown ---

The full log file is very long, if you need more, please see it here .

I ahve tried resetting user data and delete .vs folder in my project but it does not work. Can anyone suggest a fix? Thank you very much.

I ran into same issue after installing language pack for spanish.

Switching back to international settings to English allowed me to continue working on the cshtml. Must mention that if i switch back to spanish, condition reappears:

So go to:
1. Tools > Options > Environment > International Settings.
2. Select English at Language dropdown.

BTW my Visual Studio versión is the Community one, and haven't tried reinstalling the language pack.

Remember seeing a report a while on MS site (cant't find it lately), hope this helps to shed some light on this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM