Skip to content

Find All References misses static-form calls to extension block methods #84020

@vsfeedback

Description

@vsfeedback

This issue has been moved from a ticket on Developer Community.


[severity:It's more difficult to complete my work]
When an extension method defined in an extension block is invoked via the static form of a class name, it is not counted as a reference by Visual Studio.

In short, given the following code:

public static class MyClass {
    extension(object x) {
        void M() {
        }
    }
    static void M2() {
        M(new object());
    }
}

Although M2 clearly calls method M, when checking "Find All References" for M in VS, the count shows as zero.

image.png


Original Comments

Feedback Bot on 5/11/2026, 11:35 AM:

Based on similar issues resolved with Microsoft in the last 6 months, the following can help resolve this issue faster.

If not already included, please provide:

Detected: OS: 10.0.26200.0, VS: 18.5.2 (18.5.11723.231), Product: community-2026, Project type: C#

Please confirm:

  • Does this reproduce in a new/simple C# solution, or only in this specific solution?
  • Can you share the exact steps to reproduce from a clean start (open solution/file, which reference you search for, and how you invoke Find All References)?
  • Is the missing reference only the static-form call M(new object()), or are other call patterns also missed?
  • Does the issue still occur after deleting the .vs folder and %LocalAppData%\Microsoft\VisualStudio\<instance>\ComponentModelCache, then restarting Visual Studio?

Feedback Bot on 5/12/2026, 08:34 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.

Nur Umairah binti Hakimi (Centific Technologies Inc) [MSFT] on 5/21/2026, 06:55 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions