1

I read this on this article https://devblogs.microsoft.com/visualstudio/whats-new-in-net-productivity-with-visual-studio-2022/

The Code Definition Window now supports C# and Visual Basic allowing you to quickly understand and explore code. To use the Code Definition Window, select View > Window > Code Definition. Next, place your cursor on an identifier to navigate and explore code.

However, it doesn't work on my computer. The Code Definition Window simply shows "No definition selected". It works on a C++ project.

Did I miss anything?

CinCout
  • 9,486
  • 12
  • 49
  • 67
zagZzig
  • 136
  • 1
  • 9
  • 2
    I've tried and for me it's the same. For different C# projects it just writes "No definition selected". May be it's a bug, try to ask Microsoft on github – demonplus Dec 16 '21 at 09:57

1 Answers1

1

It looks like this is a Visual Studio 2022 version 17.1 Preview 1 feature

NET Productivity

  • Go To Definition from source information in PDBs.
  • IntelliSense completion for await within an awaitable expression.
  • Move static members to a new type refactoring.
  • Simplify code to use the new C# 10.0 extended property patterns refactoring.
  • Detect variable swaps and suggest using a tuple to swap values refactoring.
  • Code definition window support for C# and Visual Basic.
  • ...

https://learn.microsoft.com/en-us/visualstudio/releases/2022/release-notes-preview

Chrᴉz remembers Monica
  • 1,829
  • 1
  • 10
  • 24
capsaicin
  • 26
  • 3
  • just upgrated to 17.1 today. It works! – zagZzig Feb 17 '22 at 04:24
  • I updated but still the same message show, what am i missing. My version is 17.1.2 – Bora Karaca Mar 29 '22 at 14:22
  • I'm using Visual Studio Enterprise 2022 (64-bit) - Current Version 17.1.2 and it's still working for me. So, if you click, for example, on the name of a method at a call site, you still get the message? – capsaicin Mar 30 '22 at 15:21
  • Thanks for advice but i get still same "No definition selected" message. I tried on method or the services I called, nothing changed. I give up :) – Bora Karaca Mar 31 '22 at 13:17