ILIA BROUDNO
ILIA BROUDNO

Reputation: 1893

Visual Studio 2022 C# can't "Find All References" in some cases

In VS 2022 in a C# project I right-click on a method and select "Find All References" In some cases it shows no references, but when I put a breakpoint it stops in this method and in the call stack it's a normal call not some reflection magic. The method in question does reside in a different project than the caller of that method, but they are both in the same solution.

What am I missing?

enter image description here

Upvotes: 7

Views: 5013

Answers (2)

eikuh
eikuh

Reputation: 697

In my case, the solution to the problem was:

  • close Visual Studio
  • delete all .vs folders related to the solution and its projects (note that these folders are typically hidden folders)
  • re-start Visual Studio

Upvotes: 4

hijinxbassist
hijinxbassist

Reputation: 4591

Make sure that the contained by dropdown is set to Entire Solution.

enter image description here

Upvotes: 2

Related Questions