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

"Go to type definition" and other navigations not working #4251

Closed
macon opened this issue Nov 30, 2020 · 1 comment · Fixed by #5094
Closed

"Go to type definition" and other navigations not working #4251

macon opened this issue Nov 30, 2020 · 1 comment · Fixed by #5094

Comments

@macon
Copy link

macon commented Nov 30, 2020

Issue Description

"Go to Type Definition" and other navigations are no longer working for C#.

I've tried reinstalling, disabling all extensions, trying vscode-insiders.

"Go to Definition" (F12) works fine but is disabled in the main menu (as are the other navigations). Setting various key bindings for "editor.action.goToTypeDefinition" don't help.

Steps to Reproduce

On any C# project, place cursor on a variable of one of your types. Go to menu Go and see Go to Type Definition greyed out. Alternatively, right click the variable and I don't see Go to Type Definition. Also using the keybinding for Go to Type Definition does nothing.

Expected Behavior

All these standard C# navigation features used to work.

Actual Behavior

Many standard menu navigations are greyed-out/disabled, none of the keybindings work.

Logs

OmniSharp log

Starting OmniSharp server at 11/30/2020, 9:42:25 AM Target: /Users/mcotton/git/ob-certificate-service/Secret.Service.sln

OmniSharp server started.
Path: /Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/run
PID: 13453

Starting OmniSharp on MacOS 10.15.7 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.8.0 - "/Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin/MSBuild.exe'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.8.0 - "/Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin
CscToolPath = /Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /Users/mcotton/.vscode/extensions/ms-dotnettools.csharp-1.23.6/.omnisharp/1.37.3/omnisharp/.msbuild
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/Users/mcotton/git/ob-certificate-service'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/Users/mcotton/git/ob-certificate-service/Secret.Service.sln'.
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/Secret.Service.API.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Protos/TrueLayer.Secret.Service.Protos.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Domain/Secret.Service.Domain.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Integration.Test/Secret.Service.Integration.Test.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Repository/Secret.Service.Repository.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Test/Secret.Service.Test.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Grpc/Secret.Service.Grpc.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Client/TrueLayer.Secret.Service.Client.csproj'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/Users/mcotton/git/ob-certificate-service/test/TrueLayer.Secret.Service.Client.Test/TrueLayer.Secret.Service.Client.Test.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/Users/mcotton/git/ob-certificate-service'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/Secret.Service.API.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/Users/mcotton/git/ob-certificate-service' on host 13433.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/Secret.Service.API.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/Secret.Service.API.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Protos/TrueLayer.Secret.Service.Protos.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Protos/TrueLayer.Secret.Service.Protos.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Protos/TrueLayer.Secret.Service.Protos.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.Domain/Secret.Service.Domain.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Domain/Secret.Service.Domain.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Domain/Secret.Service.Domain.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/test/Secret.Service.Integration.Test/Secret.Service.Integration.Test.csproj
Can't find custom attr constructor image: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/bin/Debug/netcoreapp3.1/Secret.Service.API.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Integration.Test/Secret.Service.Integration.Test.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Integration.Test/Secret.Service.Integration.Test.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.Repository/Secret.Service.Repository.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Repository/Secret.Service.Repository.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Repository/Secret.Service.Repository.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/test/Secret.Service.Test/Secret.Service.Test.csproj
Can't find custom attr constructor image: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.API/bin/Debug/netcoreapp3.1/Secret.Service.API.dll mtoken: 0x0a00000c due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Test/Secret.Service.Test.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/test/Secret.Service.Test/Secret.Service.Test.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/Secret.Service.Grpc/Secret.Service.Grpc.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Grpc/Secret.Service.Grpc.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/Secret.Service.Grpc/Secret.Service.Grpc.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Client/TrueLayer.Secret.Service.Client.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Client/TrueLayer.Secret.Service.Client.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/src/TrueLayer.Secret.Service.Client/TrueLayer.Secret.Service.Client.csproj'
info: OmniSharp.MSBuild.ProjectManager
Loading project: /Users/mcotton/git/ob-certificate-service/test/TrueLayer.Secret.Service.Client.Test/TrueLayer.Secret.Service.Client.Test.csproj
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/Users/mcotton/git/ob-certificate-service/test/TrueLayer.Secret.Service.Client.Test/TrueLayer.Secret.Service.Client.Test.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/Users/mcotton/git/ob-certificate-service/test/TrueLayer.Secret.Service.Client.Test/TrueLayer.Secret.Service.Client.Test.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.API
info: OmniSharp.MSBuild.ProjectManager
Update project: TrueLayer.Secret.Service.Protos
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.Domain
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.Integration.Test
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.Repository
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.Test
info: OmniSharp.MSBuild.ProjectManager
Update project: Secret.Service.Grpc
info: OmniSharp.MSBuild.ProjectManager
Update project: TrueLayer.Secret.Service.Client
info: OmniSharp.MSBuild.ProjectManager
Update project: TrueLayer.Secret.Service.Client.Test
info: OmniSharp.Roslyn.CSharp.Services.Diagnostics.CSharpDiagnosticWorkerWithAnalyzers
Solution initialized -> queue all documents for code analysis. Initial document count: 213.

C# log

Nothing in C# output window

Environment information

VSCode version: 1.51.1
C# Extension: 1.23.6

Mono Information OmniSharp using built-in mono
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.1.401 Commit: 39d17847db

Runtime Environment:
OS Name: Mac OS X
OS Version: 10.15
OS Platform: Darwin
RID: osx.10.15-x64
Base Path: /usr/local/share/dotnet/sdk/3.1.401/

Host (useful for support):
Version: 3.1.7
Commit: fcfdef8d6b

.NET Core SDKs installed:
3.1.401 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
csharp ms-dotnettools 1.23.6
@jtschuster
Copy link
Member

+1 I would love to be able to use "Go to type definition" in VS Code when writing C# code.

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

Successfully merging a pull request may close this issue.

2 participants