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 definition not working #85017

Closed
shamsulaman786 opened this issue Nov 18, 2019 · 4 comments
Closed

go to definition not working #85017

shamsulaman786 opened this issue Nov 18, 2019 · 4 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension editor-symbols definitions, declarations, references info-needed Issue requires more information from poster

Comments

@shamsulaman786
Copy link

Issue Type: Bug

When I'm trying to get the definition of any method from called place. no definition found is coming.
kindly give me any solution.

VS Code version: Code 1.39.2 (6ab5985, 2019-10-15T15:33:40.634Z)
OS version: Linux x64 4.4.0-142-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz (4 x 897)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 7.71GB (0.71GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
Extensions (6)
Extension Author (truncated) Version
vscode-eslint dba 1.9.1
php-debug fel 1.13.0
php-intellisense fel 2.3.13
php-pack fel 1.0.2
sublime-keybindings ms- 4.0.3
vetur oct 0.22.6
@jrieken jrieken added editor-symbols definitions, declarations, references info-needed Issue requires more information from poster labels Nov 18, 2019
@jrieken jrieken self-assigned this Nov 18, 2019
@jrieken
Copy link
Member

jrieken commented Nov 18, 2019

This is not very informative and doesn't allow me to reproduce anything. Go to definition works for me, so please add more information, like in what language, in what file, at what position you are trying this etc

@xmik
Copy link

xmik commented Nov 22, 2019

I confirm @shamsulaman786's problem. I have it in Visual Studio Code 1.38.1, working with C#. It is actually hard to reproduce, because it sometimes works (on simple cases like 2 new C# classes and one of them references the other) and sometimes not.

Edit: I'm using the extension: C# for Visual Studio Code (powered by OmniSharp), version: 1.21.7.

@xmik
Copy link

xmik commented Nov 22, 2019

I can reproduce it with the following code:

using System;
using Microsoft.AspNetCore.Hosting;

namespace MyCompany.Tests
{
    public class TestServerBuilder
    {
        private IWebHostBuilder hostBuilder;

        public TestServerBuilder()
        {
            hostBuilder = new WebHostBuilder();
        }
    }
}

When I right-click on IWebHostBuilder and then choose "Go to definition", then there is the caption: "No definition found for 'IWebHostBuilder'".

Edit: I found a (crude) solution: dotnet/vscode-csharp#3049 (comment) I needed to edit the /usr/share/dotnet/sdk/2.2.301/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props file. I didn't notice earlier that Omnisharp failed to load my projects.

@jrieken jrieken added the *caused-by-extension Issue identified to be caused by an extension label Nov 25, 2019
@vscodebot
Copy link

vscodebot bot commented Nov 25, 2019

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Nov 25, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension editor-symbols definitions, declarations, references info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants