You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.
Create a new MVC View Page in an ASP.NET Core Web Application, and add the following at the top of the view page:
@{
var @do = "do";
}
Then attempt to type <div>@(@do) in the view page.
Result:
VS crashes shortly after @(@
System.InvalidCastException: Unable to cast object of type 'Microsoft.AspNetCore.Razor.Chunks.TemplateChunk' to type 'Microsoft.AspNetCore.Razor.Chunks.ExpressionChunk'.
at Microsoft.AspNetCore.Razor.CodeGenerators.Visitors.CSharpCodeVisitor.RenderDesignTimeExpressionBlockChunk(ExpressionBlockChunk chunk)
at Microsoft.AspNetCore.Razor.CodeGenerators.Visitors.CSharpCodeVisitor.Visit(ExpressionBlockChunk chunk)
at Microsoft.AspNetCore.Razor.CodeGenerators.Visitors.ChunkVisitor`1.Accept(Chunk chunk)
at Microsoft.AspNetCore.Razor.CodeGenerators.Visitors.ChunkVisitor`1.Accept(IList`1 chunks)
at Microsoft.AspNetCore.Razor.CodeGenerators.CSharpCodeGenerator.Generate()
at Microsoft.AspNetCore.Razor.RazorTemplateEngine.GenerateCodeCore(ITextDocument input, String className, String rootNamespace, String sourceFileName, String checksum, Nullable`1 cancelToken)
at Microsoft.AspNetCore.Razor.RazorTemplateEngine.GenerateCode(ITextBuffer input, String className, String rootNamespace, String sourceFileName, Nullable`1 cancelToken)
at Microsoft.AspNetCore.Razor.Editor.BackgroundParser.BackgroundThread.ParseChange(ITextBuffer buffer, CancellationToken token)
at Microsoft.AspNetCore.Razor.Editor.BackgroundParser.BackgroundThread.WorkerLoop()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The text was updated successfully, but these errors were encountered:
Create a new MVC View Page in an ASP.NET Core Web Application, and add the following at the top of the view page:
Then attempt to type
<div>@(@do)
in the view page.Result:
VS crashes shortly after
@(@
The text was updated successfully, but these errors were encountered: