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
Error "Request textDocument/definition failed." pops up. The log contains:
[Error - 4:09:41 PM] [LanguageServerHost]System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind, UriCreationOptions& creationOptions)
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.CreateAbsoluteUri(String absolutePath) in /_/src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 174
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.<TextSpanToLocationAsync>g__ConvertTextSpanToLocation|30_0(Document document, TextSpan span, Boolean isStale, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 464
at Microsoft.CodeAnalysis.LanguageServer.ProtocolConversions.TextSpanToLocationAsync(Document document, TextSpan textSpan, Boolean isStale, Nullable`1 context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs:line 429
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 61
at Microsoft.CommonLanguageServerProtocol.Framework.QueueItem`3.StartRequestAsync(TRequestContext context, CancellationToken cancellationToken) in /_/src/Features/LanguageServer/Microsoft.CommonLanguageServerProtocol.Framework/QueueItem.cs:line 176
[Error - 4:09:41 PM] Request textDocument/definition failed.
Message: Invalid URI: The format of the URI could not be determined.
Code: -32000
[object Object]
Environment Information
Latest release (v0.3.21) or pre-release version Dev Kit extension (v0.4.8)
v2.0.416 of C# extension
The text was updated successfully, but these errors were encountered:
@svick could you set the 'dotnet.server.trace' setting to 'Trace' and attach the contents of the C# LSP trace logs? That should tell us what URI its throwing on.
@arkalyanms I'm currently on vacation, so I might not be able to do that soon. But the steps I provided should be enough for you to reproduce it yourself.
Describe the Issue
It seems that using Go to Definition on a
partial
method whose definition comes from a source generator does not work.Steps To Reproduce
Create a new .Net 7 project.
Add the following code:
Use Go to Definition on
AbcOrDefGeneratedRegex()
.Error "Request textDocument/definition failed." pops up. The log contains:
Environment Information
The text was updated successfully, but these errors were encountered: