vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

Find All References finds definition

Open Novack opened this issue 2 years ago • 7 comments

Type: Bug

Issue Description

My VSCode setup is mainly focused in Unity3D projects., with C# Dev Kit, and so on.

As oppossed to Visual Studio, using "Find All References", finds and lists among the references the symbols own definition. This is incorrect and distracting to read among the listed references, as well as misguiding in the cases when there are in fact, no references to that symbol.

I have found no settings that may help with this behaviour, can I change it somehow? Thanks for any help!

Steps to Reproduce

  1. Use Find all references. (In my case is in a Unity project setup, with C# Dev Kit).
  2. The symbol definition will be listed among its references.

Environment information

VSCode version: 1.81.1 C# Extension: 2.0.413 Using OmniSharp: false

Dotnet Information

Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4

.NET SDKs installed: No SDKs were found.

.NET runtimes installed: Microsoft.NETCore.App 7.0.10 [c:\Users\Operador\AppData\Roaming\VSCodium\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime.dotnet\7.0.10\shared\Microsoft.NETCore.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
code-settings-sync Shan 3.4.3 shan.code-settings-sync-3.4.3
codeium Codeium 1.2.71 codeium.codeium-1.2.71
csdevkit ms-dotnettools 0.3.21 ms-dotnettools.csdevkit-0.3.21-win32-x64
csharp ms-dotnettools 2.0.413 ms-dotnettools.csharp-2.0.413-win32-x64
github-dark-plus NAPTheDevHcj 0.0.1 napthedevhcj.github-dark-plus-0.0.1
one-monokai azemoh 0.5.0 azemoh.one-monokai-0.5.0
open-unity-meta codesteady 0.0.1 codesteady.open-unity-meta-0.0.1
renamer VolcanicBytes 0.1.0 volcanicbytes.renamer-0.1.0
shortcuts gizak 0.0.1 gizak.shortcuts-0.0.1
smartsemicolon seunghwan 1.0.3 seunghwan.smartsemicolon-1.0.3
trailing-spaces shardulm94 0.4.1 shardulm94.trailing-spaces-0.4.1
unity-code-snippets kleber-swf 2.2.5 kleber-swf.unity-code-snippets-2.2.5
unity-event-lens dgileadi 1.0.0 dgileadi.unity-event-lens-1.0.0
unity-find-in-prefabs jarvisjiang 1.0.11 jarvisjiang.unity-find-in-prefabs-1.0.11
unity-quick-docs ColdThunder11 1.0.2 coldthunder11.unity-quick-docs-1.0.2
vscode-csharp-snippets jorgeserrano 1.1.0 jorgeserrano.vscode-csharp-snippets-1.1.0
vscode-dotnet-runtime ms-dotnettools 1.7.0 ms-dotnettools.vscode-dotnet-runtime-1.7.0-universal
vscode-unitymeta PTD 0.0.7 ptd.vscode-unitymeta-0.0.7
vstuc visualstudiotoolsforunity 0.9.0 visualstudiotoolsforunity.vstuc-0.9.0

Extension version: 2.0.413 VSCodium version: VSCodium 1.81.1 (aef377c42cea6e9aea642829953104f07097abfa, 2023-08-10T18:29:45.715Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info
Item Value
CPUs AMD Ryzen 9 3900X 12-Core Processor (24 x 3793)
GPU Status 2d_canvas: enabled
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: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.92GB (17.33GB free)
Process Argv
Screen Reader no
VM 0%

Novack avatar Aug 24 '23 02:08 Novack

I'm encountering the same problem,this incorrect behavior really sucks,It feels like I'm not using c# but another script-like language!

JanusTida avatar Aug 24 '23 05:08 JanusTida

You're more lucky than me. Go to Definition, Find References,... nothing works for me, just says not found

Alumniminium avatar Aug 26 '23 12:08 Alumniminium

You're more lucky than me. Go to Definition, Find References,... nothing works for me, just says not found

Checkout the "Environment information" section on the report. Was generated automatically, may give you some hint on what you need. I didnt anything special btw.

Novack avatar Aug 26 '23 22:08 Novack

Any news on this one? Has been sitting there for 7 months now.

Novack avatar Apr 18 '24 16:04 Novack

@Novack No news. But we welcome contributions. Cheers! :)

CyrusNajmabadi avatar Apr 20 '24 23:04 CyrusNajmabadi

@Novack No news. But we welcome contributions. Cheers! :)

LMAO, that has to be one of the most shameless Microsoft official responses on the status of their software bugs to the date. A bit more politness, and a bit less cynicism would be better received (and more professional). Let me translate that for you:

"No we wont fix this long standing bug in the basic IDE functionality, better luck next year. Btw, you can fix it yourself. If you do it, give it to us. Cheers!".

Also, I guess VSCode team is kind of confused about being open source? I can't imagine such a basic issue living in the code base for that long in Visual Studio.

Novack avatar May 01 '24 19:05 Novack

Hey! I'm also facing this issue and found this thread. Feels a little less frustrating that there are other people with the same issue too. But this is a very big part of my workflow and I'm really considering switching back to Visual Studio because of this. I hope there's some updates on this soon

diamondgelato avatar Jun 20 '24 19:06 diamondgelato