Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigating to methods, properties, says no definition found. #6777

Closed
dmcbride opened this issue Dec 31, 2023 · 11 comments
Closed

Navigating to methods, properties, says no definition found. #6777

dmcbride opened this issue Dec 31, 2023 · 11 comments

Comments

@dmcbride
Copy link

Type: Bug

I can not navigate to items (methods, properties, fields) even in the same project using F12, it says "No definition found for xxx".

image

LSH logs:

Using dotnet configured on PATH
Dotnet path: /opt/dotnet-sdk-bin-8.0/dotnet
Activating C# standalone...
Starting server at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll
Server arguments /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.LanguageServer.dll --logLevel Trace --telemetryLevel all --extensionLogDirectory /home/dmcbride/.config/Code/logs/20231231T145855/window1/exthost/ms-dotnettools.csharp
waiting for named pipe information from server...
[stdout] trce: Program[0]
      .NET Runtime Version: .NET 8.0.0
[stdout] dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.AnalyzerUtilities.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Features.dll added to workspace.
[stdout] dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.CSharp.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Elfie.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.AspNetCore.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.ExternalAccess.RazorCompiler.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Features.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.CSharp.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Language.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version1_X.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Razor.Compiler.Mvc.Version2_X.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Remote.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Scripting.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll added to workspace.
dbug: LanguageServerWorkspaceFactory[0]
      Solution-level analyzer at /home/dmcbride/.vscode/extensions/ms-dotnettools.csharp-2.14.8-linux-x64/.roslyn/Microsoft.CodeAnalysis.Workspaces.MSBuild.dll added to workspace.
[stdout] {"pipeName":"/tmp/5de44c25.sock"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info  - 3:00:00 PM] [Program] Language server initialized
[LanguageServerHost] [10:00:00.159][Start]initialize
[LanguageServerHost] [10:00:00.165][Start]Initialize
[LanguageServerHost] [10:00:00.185][End]Initialize
[LanguageServerHost] [10:00:00.205][End]initialize
[LanguageServerHost] [10:00:00.208][Start]initialized
[LanguageServerHost] [10:00:00.249][End]initialized
[LanguageServerHost] [10:00:00.257][Start]workspace/diagnostic
[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] [10:00:00.279][Start]solution/open
[Info  - 3:00:00 PM] [LanguageServerProjectSystem] Loading /home/dmcbride/prj/k2/k2-server/ka-server.sln...
[BuildHost PID 24507] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program[0]
[BuildHost PID 24507] Message from Process:       BuildHost Runtime Version: .NET 8.0.0
[BuildHost PID 24507] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 24507] Message from Process:       Registered MSBuild instance at /opt/dotnet-sdk-bin-8.0/sdk/8.0.100
[Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] Choosing a build host of type NetCore for /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj.
[Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] Choosing a build host of type NetCore for /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj.
[Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager] Choosing a build host of type NetCore for /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj.
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program[0]
[BuildHost PID 24548] Message from Process:       BuildHost Runtime Version: .NET 8.0.0
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 24548] Message from Process:       Registered MSBuild instance at /opt/dotnet-sdk-bin-8.0/sdk/8.0.100
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 24548] Message from Process:       Loading /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 24548] Message from Process:       Loading /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.BuildHost[0]
[BuildHost PID 24548] Message from Process:       Loading /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj
[LanguageServerHost] [10:00:00.848][Start]workspace/didChangeConfiguration
[LanguageServerHost] [10:00:00.851][End]workspace/didChangeConfiguration
[LanguageServerHost] [10:00:00.943][Start]workspace/didChangeConfiguration
[LanguageServerHost] [10:00:00.945][End]workspace/didChangeConfiguration
[LanguageServerHost] [10:00:01.080][Start]workspace/didChangeConfiguration
[LanguageServerHost] [10:00:01.081][End]workspace/didChangeConfiguration
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj (net8.0) now has 9 source file(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj (net8.0) now has 4 source file(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj (net8.0) now has 5 source file(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj (net8.0) now has 316 reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj (net8.0) now has 183 reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj (net8.0) now has 202 reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj (net8.0) now has 9 analyzer reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj (net8.0) now has 9 analyzer reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj (net8.0) now has 23 analyzer reference(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj (net8.0) now has 2 analyzer config file(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj (net8.0) now has 2 analyzer config file(s).
[LanguageServerProjectSystem] Project /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj (net8.0) now has 2 analyzer config file(s).
[LanguageServerHost] Closing workspace/diagnostics request
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicWorkspacePullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:00:01.170][End]workspace/diagnostic
[Info  - 3:00:01 PM] [LanguageServerProjectSystem] Successfully completed load of /home/dmcbride/prj/k2/k2-server/KA.Scheduler/KA.Scheduler.csproj
[Info  - 3:00:01 PM] [LanguageServerProjectSystem] Successfully completed load of /home/dmcbride/prj/k2/k2-server/KA.Tools/KA.Tools.csproj
[Info  - 3:00:01 PM] [LanguageServerProjectSystem] Successfully completed load of /home/dmcbride/prj/k2/k2-server/KA.Rest/KA.Rest.csproj
[Info  - 3:00:01 PM] [LanguageServerProjectSystem] Completed (re)load of all projects in 00:00:00.6935250
[BuildHost PID 24548] Sending a Shutdown request to the BuildHost.
[BuildHost PID 24548] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program[0]
[BuildHost PID 24548] Message from Process:       RPC channel closed; process exiting.
[BuildHost PID 24548] Process shut down.
[BuildHost PID 24507] Sending a Shutdown request to the BuildHost.
[LanguageServerHost] [10:00:01.234][Start]workspace/debugConfiguration
[BuildHost PID 24507] Process shut down.
[LanguageServerHost] [10:00:01.234][End]solution/open
[BuildHost PID 24507] Message from Process: info: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.Program[0]
[BuildHost PID 24507] Message from Process:       RPC channel closed; process exiting.
[LanguageServerHost] [10:00:01.242][End]workspace/debugConfiguration
[LanguageServerHost] [10:00:03.174][Start]workspace/diagnostic
[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Closing workspace/diagnostics request
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicWorkspacePullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:00:03.182][End]workspace/diagnostic
[LanguageServerHost] [10:00:05.185][Start]workspace/diagnostic
[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] [10:00:50.464][Start]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] [10:00:50.464][Start]textDocument/didOpen
[LanguageServerHost] didOpen for file:///home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs
[LanguageServerHost] [10:00:50.467][End]textDocument/didOpen
[LanguageServerHost] Could not find 'file:///home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs'.  Searched Host
[LanguageServerHost] [10:00:50.479][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:50.485][Start]textDocument/documentSymbol
[LanguageServerHost] Closing workspace/diagnostics request
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicWorkspacePullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:00:50.486][End]workspace/diagnostic
[LanguageServerHost] Found 0 diagnostics for DocumentDiagnosticSource: /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs in Miscellaneous Files
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:00:50.520][End]textDocument/diagnostic
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:50.574][Start]textDocument/inlayHint
[LanguageServerHost] [10:00:50.581][End]textDocument/inlayHint
[LanguageServerHost] [10:00:50.645][End]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] [10:00:50.654][End]textDocument/documentSymbol
[LanguageServerHost] [10:00:50.696][Start]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] [10:00:50.697][End]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:50.713][Start]textDocument/semanticTokens/range
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:50.793][Start]textDocument/foldingRange
[LanguageServerHost] [10:00:50.804][End]textDocument/semanticTokens/range
[LanguageServerHost] [10:00:50.808][End]textDocument/foldingRange
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:50.937][Start]textDocument/codeLens
[LanguageServerHost] [10:00:50.950][End]textDocument/codeLens
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.339][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.339][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.339][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.340][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.340][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:51.340][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.340][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.340][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.341][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.341][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.341][Start]codeLens/resolve
[LanguageServerHost] [10:00:51.445][End]codeLens/resolve
[LanguageServerHost] [10:00:51.454][End]codeLens/resolve
[LanguageServerHost] [10:00:51.454][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.455][End]codeLens/resolve
[LanguageServerHost] [10:00:51.456][End]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:52.485][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] [10:00:52.486][Start]workspace/diagnostic
[LanguageServerHost] PublicWorkspacePullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs in Miscellaneous Files
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:00:52.495][End]textDocument/diagnostic
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:52.836][Start]textDocument/definition
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:52.859][Start]textDocument/codeLens
[LanguageServerHost] [10:00:52.859][End]textDocument/codeLens
[LanguageServerHost] [10:00:52.860][End]textDocument/definition
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:52.981][Start]textDocument/hover
[LanguageServerHost] [10:00:53.002][End]textDocument/hover
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.047][Start]textDocument/documentHighlight
[LanguageServerHost] [10:00:53.067][End]textDocument/documentHighlight
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.157][Start]textDocument/definition
[LanguageServerHost] [10:00:53.159][End]textDocument/definition
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] [10:00:53.241][Start]codeLens/resolve
[LanguageServerHost] [10:00:53.248][End]codeLens/resolve
[LanguageServerHost] [10:00:53.248][End]codeLens/resolve
[LanguageServerHost] [10:00:53.248][End]codeLens/resolve
[LanguageServerHost] [10:00:53.248][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] [10:00:53.249][End]codeLens/resolve
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:00:53.306][Start]textDocument/codeAction
[LanguageServerHost] [10:00:53.402][End]textDocument/codeAction
[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [10:03:06.832][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: , source: ) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs in Miscellaneous Files
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [10:03:06.832][End]textDocument/diagnostic

Extension version: 2.14.8
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:47:11.635Z)
OS version: Linux x64 6.6.1-gentoo
Modes:

System Info
Item Value
CPUs 13th Gen Intel(R) Core(TM) i7-13700KF (24 x 5300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 2, 2
Memory (System) 62.62GB (41.42GB free)
Process Argv . --crash-reporter-id a35db7b1-57ea-4dd9-a3f7-4ffe723758c1
Screen Reader no
VM 0%
DESKTOP_SESSION plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP undefined
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
vserr242cf:30382550
vsjup518:30340749
vshan820:30294714
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
py29gd2263:30899288
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
89544117:30613380
showlangstatbar:30737416
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30902429
pythonregdiag2cf:30926736
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
aa_t_chat:30882232
cp7184c:30925681

@dibarbet
Copy link
Member

dibarbet commented Jan 3, 2024

@dmcbride the server is loading only ka-server.sln - is Star.cs supposed to be part of a project in that solution? It looks like the server believes it is not part of the solution:

[LanguageServerHost] /home/dmcbride/prj/k2/k2-server/KA.Logic/Model/Star.cs found in workspace MiscellaneousFiles

@dibarbet dibarbet added this to the January2024 milestone Jan 3, 2024
@dibarbet dibarbet self-assigned this Jan 3, 2024
@dmcbride
Copy link
Author

dmcbride commented Jan 3, 2024

Yes, it most definitely is. Further, I got this to mostly work by downgrading the extension to version 1.26.0. I will hopefully find some time to play with it and narrow down when it starts breaking, but I can say it works with 1.26.0 and does not work with 2.14.8 or 2.4.4. I have other failures with 2.0.

By "mostly" work, I mean that there are obviously some features added in later versions that are not present in this earlier version, but this particular feature, of going to the definition of the method, property, or field, does work, and, while I do miss the newer features, or at least some of them, this is so incredibly helpful, that it's worth the sacrifice.

Note also that other features that don't work for this project in 2.14.8 include being able to use Ctrl+. to add using statements. Also, when F12 does work on a particular method or what have you in another project that is part of the same solution, it seems to prefer to decompile the DLL instead of just taking me to the source in question. This is probably related, and I bring it up in the hopes that it is related and may provide additional clues.

@JoeRobich
Copy link
Member

@dmcbride If you would like to use the 2.x version of the extension with OmniSharp, you can enable dotnet.server.useOmnisharp which might be easier than keeping it downgraded while we work on your issue.

When using OmniSharp do you also have omnisharp.enableMsBuildLoadProjectsOnDemand enabled in your VS Code settings or through an OmniSharp.json file (either in the repo or your user folder)?

@dibarbet
Copy link
Member

dibarbet commented Jan 3, 2024

@dmcbride in addition to Joey's comments, would you mind telling me the exact name of the project that Star.cs is in? I can see the server found the following projects in the solution to load:

...k2/k2-server/KA.Rest/KA.Rest.csproj.
...k2/k2-server/KA.Tools/KA.Tools.csproj.
...k2/k2-server/KA.Scheduler/KA.Scheduler.csproj.

If the project names are supposed to match the folder structure I'm not seeing a KA.Logic project being loaded. Which might mean it is missing from the sln file.

As Joey mentioned, it is possible it loads with O# using the omnisharp.enableMsBuildLoadProjectsOnDemand setting. We don't currently have support for this flag in the non-O# version of the server, that is tracked by #6008

@dpoole73
Copy link

dpoole73 commented Jan 4, 2024

i'm seeing very similar issues. I'm running on MacBook with apple silicon using the x64 version of dotnet and setting DOTNET_ROOT so using omnisharp doesn't work for me it was all working fine until recently.

I see the same things with the Miscellaneous files message and an unable to go to definition:

[LanguageServerHost] /Users/dpoole/Repos/Aurora-Base/src/Tests/ScenarioTests/TestBlocks/CSharp/CsVmWatchKustoDataValidationTest.cs found in workspace MiscellaneousFiles
[LanguageServerHost] /Users/dpoole/Repos/Aurora-Base/src/Tests/ScenarioTests/TestBlocks/CSharp/CsVmWatchKustoDataValidationTest.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [09:02:50.757][Start]codeLens/resolve
[LanguageServerHost] /Users/dpoole/Repos/Aurora-Base/src/Tests/ScenarioTests/TestBlocks/CSharp/CsVmWatchKustoDataValidationTest.cs found in workspace MiscellaneousFiles
[LanguageServerHost] [09:02:50.757][Start]codeLens/resolve
[LanguageServerHost] /Users/dpoole/Repos/Aurora-Base/src/Tests/ScenarioTests/TestBlocks/CSharp/CsVmWatchKustoDataValidationTest.cs found in workspace MiscellaneousFiles

@dmcbride
Copy link
Author

dmcbride commented Jan 5, 2024

@dmcbride in addition to Joey's comments, would you mind telling me the exact name of the project that Star.cs is in? I can see the server found the following projects in the solution to load:

...k2/k2-server/KA.Rest/KA.Rest.csproj.
...k2/k2-server/KA.Tools/KA.Tools.csproj.
...k2/k2-server/KA.Scheduler/KA.Scheduler.csproj.

If the project names are supposed to match the folder structure I'm not seeing a KA.Logic project being loaded. Which might mean it is missing from the sln file.

This is indeed the case. I missed it because everything was working just fine (other than the C# plugin here): dotnet build would indeed build it, and incorporate it into the output, and everything would execute just fine. I'm not sure if maybe dotnet itself should not be allowing this to work, but, either way, seems like the C# plugin should (eventually) follow whatever dotnet does.

I've added the missing project, and it seems, at least at a quick glance, to work now.

Perhaps, at least until this is working, it could pop up some sort of "Request failed" message that could indicate that maybe a project is missing from the solution, similar to the pop-up I get when I hit F12 on a GeneratedRegex method?

image

As Joey mentioned, it is possible it loads with O# using the omnisharp.enableMsBuildLoadProjectsOnDemand setting. We don't currently have support for this flag in the non-O# version of the server, that is tracked by #6008

I did not have this set either before or after. So somehow Omnisharp was loading the extra declared project despite not being in the sln file.

@dpoole73
Copy link

dpoole73 commented Jan 5, 2024

i think my issue may be different then. It was all working fine before the new year on this same machine, something that updated in between has broken it. language server is only working for some specific cases, I'm not getting any inline squiggly underlines, intellisense, light bulbs or anything. I tried switching to omnisharp but got the error :

image

Are there logs I can share to help diagnose the issue further?

Any suggestions for older versions I can go back to identify when the problem started happening?

@dpoole73
Copy link

dpoole73 commented Jan 5, 2024

I do see this error when opening code:

Activating the "Microsoft.VisualStudio.CpsProjectIconSourceService (0.1)" service failed.

I also see this in the C# Dev Kit - Test explorer log:

Created Test Controller
Using vstest from dotnet sdk in [/usr/local/share/dotnet/x64/sdk/8.0.100].
Initialized Test Explorer Server [67339]
Test Store Folder: /Users/dpoole/Library/Application Support/Code/User/workspaceStorage/0cb1155ccf7c948a51123cea767d1c2e/ms-dotnettools.csdevkit
Error opening test data: Failed to deserialize Microsoft.VisualStudio.TestWindow.Records.LogEntry value.
Test data was cleared upon opening.
Test data store opened in 0.001 sec.
Initialized project system provider.
Microsoft.ServiceHub.Framework.ServiceActivationFailedException: Activating the "Microsoft.VisualStudio.ProjectSystem.Query.Remoting.QueryExecutionService (0.2)" service failed.
 ---> StreamJsonRpc.RemoteInvocationException: Failed to start host 'dotnet.projectSystem$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE'. Host exited with code '130' (ErrorKind: HostExited)
   at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
   at Microsoft.ServiceHub.Framework.RemoteServiceBroker.GetProxyAsync[T](ServiceRpcDescriptor serviceDescriptor, ServiceActivationOptions options, CancellationToken cancellationToken)
RPC server exception:
StreamJsonRpc.RemoteInvocationException: Failed to start host 'dotnet.projectSystem$C94B8CFE-E3FD-4BAF-A941-2866DBB566FE'. Host exited with code '130' (ErrorKind: HostExited)
      at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
      at Microsoft.ServiceHub.Client.HubClient.RemoteServiceBrokerWrapper.<>c__DisplayClass9_0.<<RequestServiceChannelAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.ServiceHub.Client.HubClient.RemoteServiceBrokerWrapper.<>c__DisplayClass9_0.<<RequestServiceChannelAsync>b__0>d.MoveNext()
   --- End of stack trace from previous location ---
      at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
      at Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](Func`1 actionToExecute, TraceSource logger, ServiceHubRetryConfiguration`1 serviceHubRetryConfiguration, CancellationToken cancellationToken)
      at Microsoft.ServiceHub.Client.HubClient.RemoteServiceBrokerWrapper.RequestServiceChannelAsync(ServiceMoniker serviceMoniker, ServiceActivationOptions options, CancellationToken cancellationToken)
      at Microsoft.ServiceHub.Client.HubClient.RemoteServiceBrokerWrapper.RequestServiceChannelAsync(ServiceMoniker serviceMoniker, ServiceActivationOptions options, CancellationToken cancellationToken)
      at Microsoft.VisualStudio.Utilities.ServiceBroker.GlobalBrokeredServiceContainer.View.RequestServiceChannelAsync(ServiceMoniker serviceMoniker, ServiceActivationOptions serviceActivationOptions, CancellationToken cancellationToken)

   --- End of inner exception stack trace ---
   at Microsoft.ServiceHub.Framework.RemoteServiceBroker.GetProxyAsync[T](ServiceRpcDescriptor serviceDescriptor, ServiceActivationOptions options, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.Query.Remoting.QueryClientExecutionEngine.GetExecutionServiceAsync(CancellationToken cancellationToken)
   at Microsoft.VisualStudio.ProjectSystem.Query.Remoting.QueryClientExecutionEngine.SubscribeAsync[TEntity](AsyncQueryable query, IObserver`1 resultsReceiver, IQueryExecutionRemoteContext remoteContext, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.TestWindow.VSCode.ProjectSystemProvider.Service.ProjectSystemProviderService.<InitializeAsync>b__8_0()
   at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.CallWithCatchAsync(IInternalLogger log, Func`1 func)

Likely because there is no solution shown in the solution explorer is why the Language server is not working?

@dibarbet
Copy link
Member

dibarbet commented Jan 5, 2024

Perhaps, at least until this is working, it could pop up some sort of "Request failed" message that could indicate that maybe a project is missing from the solution, similar to the pop-up I get when I hit F12 on a GeneratedRegex method?

This is a tough one. A file not being in a solution is a totally expected scenario (e.g. you just open a loose C# file). Opening a pop-up in that case would generally just be noisy. We do have some backlog work to implement some kind of UI that shows what project the current opened file is in. I think that would help here as you'd be able to tell at a glance that the file isn't part of a project.

I'm not sure if maybe dotnet itself should not be allowing this to work, but, either way, seems like the C# plugin should (eventually) follow whatever dotnet does.

I think we'd like to implement on demand project loading (issue linked somewhere above), which would load your solution, and any projects you have open, so this scenario would work.

I did not have this set either before or after. So somehow Omnisharp was loading the extra declared project despite not being in the sln file.

Interesting. That is possible, I am not as familiar with the O# project loading side.

@dibarbet
Copy link
Member

dibarbet commented Jan 5, 2024

@dpoole73 yeah - if you don't have a solution explorer, devkit didn't successfully load the project (which the logs also seem to indicate). If devkit doesn't tell us the project information, we'll think everything is a misc file as you're seeing.

I've filed an issue on the devkit side with your logs, they would need to take a look to see what is going wrong.
See microsoft/vscode-dotnettools#840

@dibarbet
Copy link
Member

dibarbet commented Jan 5, 2024

I'm going to close out this issue, I think everything is either resolved or already tracked somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants