razor icon indicating copy to clipboard operation
razor copied to clipboard

Find All References - Showing razor__virtual.cs instead of actual References

Open garrettlondon1 opened this issue 2 years ago • 3 comments

Environment data

dotnet --info output: .net 7.0.401 VS Code version: latest C# Extension version: 2.4.4

When looking for references in code behind file of a Blazor Server Razor component, I expect to be able to see all the references that are calling the method.

image

Using C# Extension 2.4.4

garrettlondon1 avatar Oct 04 '23 19:10 garrettlondon1

@davidwengier do we need to include the razor span mapping service on the Roslyn side here? Or should Razor be mapping these values via a middleware

dibarbet avatar Oct 05 '23 00:10 dibarbet

We definitely don't have the Razor span mapping service, and that causes a bunch of limitations in various features. As far as I know we haven't talked about how and when we're going to try to address them. https://github.com/dotnet/razor/issues/6919 and https://github.com/dotnet/razor/issues/8845 are the tracking issues for it I guess, though thats more about when we switch to using source generators. VS Code is essentially already in that world, even though it doesn't use source generators :)

davidwengier avatar Oct 05 '23 01:10 davidwengier

I'm going to move this to the Razor repo so we can better track with the bigger issues I linked above.

davidwengier avatar Oct 05 '23 21:10 davidwengier

Possible duplicate at https://github.com/dotnet/vscode-csharp/issues/7790

phil-allen-msft avatar Nov 14 '24 23:11 phil-allen-msft

In the next C# extension release

ryzngard avatar May 06 '25 05:05 ryzngard