Omnisharp-vscode: Go to Definition not working with referenced assemblies

Created on 5 Oct 2019  路  3Comments  路  Source: OmniSharp/omnisharp-vscode

Issue Description

After updating to 1.21.4, the "Go to Definition" feature is not working when the target is defined in a referenced assembly.

Downgrading to 1.21.3 solves this problem, and I was able to reproduce the issue and the downgrade fix on both Windows and Linux (Ubuntu 18.04). Additionally, I was able to reproduce it regardless of the target framework so it doesn't appear to be an issue with netcoreapp3.0 support.

Steps to Reproduce

  1. Install or update the C# extension to 1.21.4
  2. Create or open a project that contains a package reference.
  3. Navigate in the project source code to some symbol that is defined in that package reference.
  4. Attempt to use the "Go to Definition" command (default keybind is F12).

Expected Behavior

A metadata file is generated based on the target assembly and opened in the editor window.

Actual Behavior

Error message saying that no definition could be found.

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Post the output from Output-->C# here

Environment information

VSCode version: 1.38.1
C# Extension: 1.21.4

Mono Information
OmniSharp using global mono :6.4.0

Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26

Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/3.0.100/

Host (useful for support):
Version: 3.0.0
Commit: 95a0a61858

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

.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/usr/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-vscode|1.21.3|;

Most helpful comment

Thanks. this is a duplicate of https://github.com/OmniSharp/omnisharp-roslyn/issues/1624

It is already fixed here https://github.com/OmniSharp/omnisharp-roslyn/pull/1625

there is a pre-release OmniSharp that can be used as workaround.

"omnisharp.path": "1.34.5-beta.28"

All 3 comments

Thanks. this is a duplicate of https://github.com/OmniSharp/omnisharp-roslyn/issues/1624

It is already fixed here https://github.com/OmniSharp/omnisharp-roslyn/pull/1625

there is a pre-release OmniSharp that can be used as workaround.

"omnisharp.path": "1.34.5-beta.28"

Whoops, not sure how I didn't see that before this. Pre-release version is working though. Thanks!

+1

Was this page helpful?
0 / 5 - 0 ratings