razor icon indicating copy to clipboard operation
razor copied to clipboard

Code action previews are not colorized for razor files

Open DoctorKrolic opened this issue 2 years ago • 1 comments

Version used: VS 2022 v17.3 Preview 2

To reproduce:

  1. Create blazor server app
  2. Go to _Imports.razor and delete @using {YourProjectName}.Shared namespace
  3. Go to App.razor - you will get an error that MainLayout is not recognized
  4. Invoke codefixes for MainLayout

Expected behavior: Previews for all code fixes are colorized as razor syntax

Actual behavior: All previews are just white

Demo: devenv_uAa9ibn45M

Additional context: There is nothing special for the error I showed here and previews are not colorized for all existing razor code actions. This erro is just the easiest to show

DoctorKrolic avatar Jul 08 '22 12:07 DoctorKrolic

You're totally correct that this is a gap, so I'm going to leave this open for collecting user feedback, if you feel strongly about this give the issue a 👍.

Similar to https://github.com/dotnet/razor-tooling/issues/6567, the work that needs to be done here is actually on the Platform side.

ryanbrandenburg avatar Jul 14 '22 21:07 ryanbrandenburg