razor
razor copied to clipboard
Code action previews are not colorized for razor files
Version used: VS 2022 v17.3 Preview 2
To reproduce:
- Create blazor server app
- Go to
_Imports.razor
and delete@using {YourProjectName}.Shared
namespace - Go to
App.razor
- you will get an error thatMainLayout
is not recognized - Invoke codefixes for
MainLayout
Expected behavior: Previews for all code fixes are colorized as razor syntax
Actual behavior: All previews are just white
Demo:
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
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.