Open ghost opened 1 year ago
Did you enable decompilation support? there is a setting "omnisharp.enableDecompilationSupport": true
Navigating to Metadata instead of source code. On next attempt of "go to definition" from the shown metadata, getting a File Not found error.
however, this (navigation within the metadata/decompiled source) is not currently supported, also not for decompiled sources.
You can navigate from source to metadata (or decompiled source) and from metadata to metadata in another file (or in another decompiled source), but not from metadata to metadata in the same file (or in the same decompile source).
Did you enable decompilation support? there is a setting
"omnisharp.enableDecompilationSupport": true
Yes, it's enabled and the Terms Agreement is also accepted.
Navigating to Metadata instead of source code. On next attempt of "go to definition" from the shown metadata, getting a File Not found error.
however, this (navigation within the metadata/decompiled source) is not currently supported, also not for decompiled sources.
You can navigate from source to metadata (or decompiled source) and from metadata to metadata in another file (or in another decompiled source), but not from metadata to metadata in the same file (or in the same decompile source).
Thanks, I didn't know this. Though it seems to be very weird limitation. Any Idea, if this is being worked upon or planned ?
Anyhow, Navigating (using GoToDefinition) from Source to decompiled source should work but rather I get navigated to metadata instead.
Anyhow, Navigating (using GoToDefinition) from Source to decompiled source should work but rather I get navigated to metadata instead.
I think something is wrong with the extension passing the options to OmniSharp then. You should be able to use the following workaround:
Create a file omnisharp.json
at ~/.omnisharp/omnisharp.json
with the following content and restart OmniSharp.
{
"RoslynExtensionsOptions": {
"EnableDecompilationSupport": true
}
}
Issue Description
Go to definition navigates to Metadata instead of decompiled source code. I am using Kubernetes client library and trying to navigate to the decompiled source code using "Go To Definition". However, I am being navigated to the Metadata for the navigated method instead of the decompile source code. Hovering over the method name when pressing the CMD key (I have different key mappings), it shows me" 2 implementation available". However, when I try navigating to implementation, I am given a "FileNotFound exception in the Omnisharp Logs and the editor window. The editor windows have error - "The editor could not be opened because the file was not found, Create File ".
The path shown in gutter is the same that I see in omnisharp logs -
/$metadata$/Project/<Redacted>/<Redacted>/Assembly/KubernetesClient/Basic/Symbol/k8s/IAppsV1Operations.cs
I guess,
$metadata$
is not resolved before handing over request to file system because when I click on "Create file", I get the following error in a popup window -Unable to write file /$metadata$/Project/<Redacted>/<Redacted>/Assembly/KubernetesClient/Basic/Symbol/k8s/IAppsV1Operations.cs' (Unknown (FileSystemError): Error: EROFS: read-only file system, mkdir '/$metadata$')
Steps to Reproduce
Expected Behavior
Should have navigated to decompiled source in editor.
Actual Behavior
Navigating to Metadata instead of source code. On next attempt of "go to definition" from the shown metadata, getting a File Not found error.
Logs
OmniSharp log
C# log
Empty
Environment information
VSCode version: 1.74.3 C# Extension: 1.25.4
Mono Information
There is a problem with running OmniSharp on mono: Error: Unable to find Mono. Ensure that Mono's '/bin' folder is added to your environment's PATH variable.Dotnet Information
.NET SDK: Version: 7.0.102 Commit: 4bbdd14480 Runtime Environment: OS Name: Mac OS X OS Version: 13.2 OS Platform: Darwin RID: osx.13-arm64 Base Path: /usr/local/share/dotnet/sdk/7.0.102/ Host: Version: 7.0.2 Architecture: arm64 Commit: d037e070eb .NET SDKs installed: 6.0.403 [/usr/local/share/dotnet/sdk] 6.0.405 [/usr/local/share/dotnet/sdk] 7.0.101 [/usr/local/share/dotnet/sdk] 7.0.102 [/usr/local/share/dotnet/sdk] .NET runtimes installed: Microsoft.AspNetCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.11 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.13 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.2 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] Other architectures found: None Environment variables: Not set global.json file: Not found Learn more: https://aka.ms/dotnet/info Download .NET: https://aka.ms/dotnet/downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |auto-using|Fudge|0.7.15| |codespaces|GitHub|1.13.7| |copilot|GitHub|1.71.8269| |csharp|ms-dotnettools|1.25.4| |dotnet-test-explorer|formulahendry|0.7.8| |EditorConfig|EditorConfig|0.16.4| |intellij-idea-keybindings|k--kato|1.5.5| |namespace|adrianwilczynski|1.1.2| |nuget-reverse-package-search|jesschadwick|0.1.68| |powershell|ms-vscode|2023.1.0| |roslynator|josefpihrt-vscode|4.2.0| |vscode-icons|vscode-icons-team|12.2.0| |vscode-proto3|zxh404|0.5.5|;