Crash on paste. 馃槩
Steps to reproduce the behavior:
Index.razor to contain@page "/"
<h1>Hello, world!</h1>
Welcome to your new app.
@functions {
RenderFragment menu = @<div>Hi</div>;
RenderFragment toprow = @<ul>Hello in the top row.</ul>;
}
<div>Hi</div> and paste in: <li class="nav-item px-3">
<NavLink class="nav-link" href="fetchdata">
<span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data
</NavLink>
</li>
@javiercn this looks like the same one you found 馃槃
@NTaylorMullen Maybe, but mine contained a GIF to showcase it. @rynowak get on my level bro!
Just reproduced and can confirm it is the same callstack as the one @javiercn found.
System.InvalidOperationException
HResult=0x80131509
Message=The reference is invalid. The node 'Microsoft.AspNetCore.Razor.Language.Intermediate.TagHelperIntermediateNode' could not be found as a child of 'Microsoft.AspNetCore.Razor.Language.Intermediate.MarkupElementIntermediateNode'.
Source=Microsoft.AspNetCore.Razor.Language
StackTrace:
at Microsoft.AspNetCore.Razor.Language.Intermediate.IntermediateNodeReference.Replace(IntermediateNode node) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\Intermediate\IntermediateNodeReference.cs:line 200
at Microsoft.AspNetCore.Razor.Language.Components.ComponentLoweringPass.ExecuteCore(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\Components\ComponentLoweringPass.cs:line 55
at Microsoft.AspNetCore.Razor.Language.IntermediateNodePassBase.Execute(RazorCodeDocument codeDocument, DocumentIntermediateNode documentNode) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\IntermediateNodePassBase.cs:line 40
at Microsoft.AspNetCore.Razor.Language.DefaultRazorOptimizationPhase.ExecuteCore(RazorCodeDocument codeDocument) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\DefaultRazorOptimizationPhase.cs:line 24
at Microsoft.AspNetCore.Razor.Language.RazorEnginePhaseBase.Execute(RazorCodeDocument codeDocument) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\RazorEnginePhaseBase.cs:line 40
at Microsoft.AspNetCore.Razor.Language.DefaultRazorEngine.Process(RazorCodeDocument document) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\DefaultRazorEngine.cs:line 51
at Microsoft.AspNetCore.Razor.Language.DefaultRazorProjectEngine.ProcessCore(RazorCodeDocument codeDocument) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\DefaultRazorProjectEngine.cs:line 259
at Microsoft.AspNetCore.Razor.Language.RazorProjectEngine.ProcessDesignTime(RazorProjectItem projectItem) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.AspNetCore.Razor.Language\RazorProjectEngine.cs:line 66
at Microsoft.VisualStudio.Editor.Razor.BackgroundParser.BackgroundThread.ParseChange(ITextSnapshot snapshot, CancellationToken token) in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.VisualStudio.Editor.Razor\BackgroundParser.cs:line 358
at Microsoft.VisualStudio.Editor.Razor.BackgroundParser.BackgroundThread.WorkerLoop() in C:\Github\aspnet\AspNetCore-Tooling\src\Razor\src\Microsoft.VisualStudio.Editor.Razor\BackgroundParser.cs:line 308
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()
Most helpful comment
@NTaylorMullen Maybe, but mine contained a GIF to showcase it. @rynowak get on my level bro!