dotnet / dotnet/roslyn

Find All References on new ClassName() should find all references not new initiations only

Open
#84,019 3 comments 0 reactions 0 assignees View on GitHub
Area-IDE
Dominant language
C#
Stars
20.7k
Forks
4.3k
PR merge metrics
PR metrics pending

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/Find-All-References-on-new-ClassName-s/11082449)._

---
[severity:It bothers me. A fix would be nice]
If you have a class like (example 1):-
public class ClassName
{

}

and there are methods that use the class as a parameter (example 2)
public void TheMethod(ClassName value)

and other code that creates new instances of the class (example 3)
var value = new ClassName()

If you right-click on ClassName in example 3 and select "Find All References" it will only find new initiations like in example 3, but it should find the code in examples 1 and 2.

If you right click on ClassName in example 1 and select "Find All References" it will correctly find all referances.

---
### Original Comments

#### Feedback Bot on 4/28/2026, 06:24 PM:

(private comment, text removed)
#### Feedback Bot on 4/29/2026, 06:54 AM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

#### Teh Xian Yoong (Centific Technologies Inc) [MSFT] on 5/18/2026, 06:13 AM:

Thanks for your sharing the detail steps, I can reproduce this issue through your shared steps and this issue has been escalated for further investigation, if there is any process, I will inform you immediately.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.