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 goes to decompiled code from assembly instead of the actual code #40

Closed
tverboon opened this issue Jun 7, 2023 · 8 comments
Assignees

Comments

@tverboon
Copy link

tverboon commented Jun 7, 2023

Type: Bug

Steps to reproduce

Press F12 (Go to definition) on code defined in another project within the same solution.

Expected behavior

Go to the code in the solution.

Actual behavior

Pressing F12 will go to decompiled code from the assembly in the obj directory. Go to definition within the same project works as it should.

Extension version: 0.1.83
VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T15:00:40.428Z)
OS version: Darwin arm64 22.5.0
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Apple M1 Max (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
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) 2, 2, 2
Memory (System) 32.00GB (0.36GB free)
Process Argv --crash-reporter-id 516dbf53-3b0c-40b9-b808-0b110887c51d
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30610678
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixhidewlkth:30730051
hidesbindicator:30760978
pythongtdpath:30739704

@solrevdev
Copy link

Same here - #41

@tverboon
Copy link
Author

tverboon commented Jun 7, 2023

@timheuer This issue is also being discussed in the Roslyn repo: dotnet/roslyn#68472

@jasonmalinowski jasonmalinowski self-assigned this Jun 7, 2023
@arunchndr arunchndr added triaged The issue has been triaged area-roslyn labels Jun 7, 2023
@jasonmalinowski
Copy link
Member

Just to follow up on this -- we think we have the problem root-caused and a fix written up, so thank you all for the reports!

@BinToss
Copy link

BinToss commented Jun 12, 2023

Does this also affect generated source files i.e. *.g.cs or am I experiencing a different issue?

@tverboon
Copy link
Author

Does this also affect generated source files i.e. *.g.cs or am I experiencing a different issue?

It would be my guess:

Looks like this is fallout from us accidentally loading projects with both project systems (the devkit one, and the one in the C# extension) at the same time. Since duplicate projects meant there were two projects with the same output path, we stopped the P2P reference conversion since something was clearly up.

dotnet/roslyn#68472 (comment)

@jasonmalinowski
Copy link
Member

Does this also affect generated source files i.e. *.g.cs or am I experiencing a different issue?

@BinToss I'd say assume that's a separate issue until we've proven otherwise. Do file another issue if you haven't already!

@babula38
Copy link

Does this also affect generated source files i.e. *.g.cs or am I experiencing a different issue?

It would be my guess:

Looks like this is fallout from us accidentally loading projects with both project systems (the devkit one, and the one in the C# extension) at the same time. Since duplicate projects meant there were two projects with the same output path, we stopped the P2P reference conversion since something was clearly up.

dotnet/roslyn#68472 (comment)

It seems correct I just disabled the "C# devkit" now "goto definition is working for me"

@arunchndr arunchndr removed triaged The issue has been triaged area-roslyn labels Jun 13, 2023
@jasonmalinowski
Copy link
Member

We shipped version 2.0.212 of the C# extension earlier today which contains a fix for this issue. Thank you all for the reports and sorry for the trouble on this one!

jasonmalinowski added a commit to dotnet/vscode-csharp that referenced this issue Jun 14, 2023
When we were looking to see if Dev Kit was installed to know whether
we should trigger our own project system, we checked
_wasActivatedWithCSharpDevkit; but that wasn't set since we don't
await the server launch a few lines before. The field would be unset
and as a result we'd run both.

Fixes microsoft/vscode-dotnettools#40
Fixes dotnet/roslyn#68472
Fixes #5711
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants