-
Notifications
You must be signed in to change notification settings - Fork 675
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
Comments
@dmcbride the server is loading only
|
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 |
@dmcbride If you would like to use the 2.x version of the extension with OmniSharp, you can enable When using OmniSharp do you also have |
@dmcbride in addition to Joey's comments, would you mind telling me the exact name of the project that
If the project names are supposed to match the folder structure I'm not seeing a As Joey mentioned, it is possible it loads with O# using the |
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:
|
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?
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. |
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 : 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? |
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:
Likely because there is no solution shown in the solution explorer is why the Language server is not working? |
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 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.
Interesting. That is possible, I am not as familiar with the O# project loading side. |
@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. |
I'm going to close out this issue, I think everything is either resolved or already tracked somewhere else. |
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".
LSH logs:
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
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
A/B Experiments
The text was updated successfully, but these errors were encountered: