c# devkit pops up several "request textdocument/definition failed."
Version Used: C# dev kit 1.2.7
Steps to Reproduce:
- clone https://github.com/bogle-tools/site
- open in vscode with C# dev kit 1.2.7 installed (appears to be latest update published) - but this has been happening for months
- edit some c# files and razor files...and eventually you'll see a bunch of 'request textdocument/definition failed." message popups
click on "go to output:" and this is in output window: [Error - 8:52:54 AM] [LanguageServerHost] System.ArgumentOutOfRangeException: The requested line number 3485 must be less than the number of lines 2210. (Parameter 'Line') at Microsoft.CodeAnalysis.Text.TextLineCollection.GetPosition(LinePosition position) in //src/Compilers/Core/Portable/Text/TextLineCollection.cs:line 67 at Microsoft.CodeAnalysis.LanguageServer.Extensions.GetPositionFromLinePositionAsync(TextDocument document, LinePosition linePosition, CancellationToken cancellationToken) in //src/Features/LanguageServer/Protocol/Extensions/Extensions.cs:line 173 at Microsoft.CodeAnalysis.LanguageServer.Handler.AbstractGoToDefinitionHandler.GetDefinitionAsync(TextDocumentPositionParams request, Boolean typeOnly, RequestContext context, CancellationToken cancellationToken) in //src/Features/LanguageServer/Protocol/Handler/Definitions/AbstractGoToDefinitionHandler.cs:line 141 at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in //src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 189
Expected Behavior: Less useless prompts
Actual Behavior: 3-4 useless prompts often when working on my project.
@davidwengier is it possible the file is being regenerated, but the lsp messages are not getting ordered properly wrt to them?
I have the same issue
This should be resolved with v2.39.28 (pre-release). Please let me know if you continue to experience problems.
I dont see this version in VSCode plugin versions https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit
It's in the C# extension https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp