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
Navigate to the @code block and run Extract to code behind
Go back to Counter.razor
Add an empty @code { } block.
Inside the block, type override so override completion comes up
Observe yellow bar
Stack trace:
System.InvalidOperationException : Unexpected null - file AbstractMemberInsertingCompletionProvider.cs line 162
at Microsoft.CodeAnalysis.Contract.Fail(String message,Int32 lineNumber,String filePath)
at Microsoft.CodeAnalysis.Contract.ThrowIfNull[T](Nullable`1 value,Int32 lineNumber,String filePath)
at Microsoft.CodeAnalysis.Completion.Providers.AbstractMemberInsertingCompletionProvider.ComputeDestinationSpan(SyntaxNode insertionRoot)
at async Microsoft.CodeAnalysis.Completion.Providers.AbstractMemberInsertingCompletionProvider.RemoveDestinationNodeAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Completion.Providers.AbstractMemberInsertingCompletionProvider.DetermineNewDocumentAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Completion.Providers.AbstractMemberInsertingCompletionProvider.GetChangeAsync(<Unknown Parameters>)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.CodeAnalysis.Extensions.IExtensionManagerExtensions.PerformFunctionAsync[T](<Unknown Parameters>)
From a quick debug it seems like its trying to generated the override method into the code behind file. Perhaps fall out from #76821
Also seeing other weirdness with override completion in general. In a razor file with a lot of C# code in a @code block, I can bring up override completion at the top of the code block, and when accepting it, the implementation ends up 500 lines lower down in the file. Seems like maybe something has lost a "if completion then context position is really important" check.
Version Used: Version 17.14.0 Preview 2.0
Steps to Reproduce:
@code
block and runExtract to code behind
@code { }
block.override
so override completion comes upStack trace:
From a quick debug it seems like its trying to generated the override method into the code behind file. Perhaps fall out from #76821
/cc @CyrusNajmabadi @arunchndr @phil-allen-msft as this is probably 17.14 worthy
The text was updated successfully, but these errors were encountered: