Search code examples
c#visual-studioblazor

Can I remove the "highlighting" in a razor file in Visual Studio?


I wanted to try out blazor and mess around with it and make some stuff for testing. I really like it, but the only thing that really annoys me is the highlighting of sequences in the razor file, where C# is written.

Higlighted Code in a razor file

I marked some "highlights" in the picture above. Is there any way to remove this, so it looks normal, like when I am writing in a .cs file?


Solution

  • Go to Tools > Options > Environment > Fonts and Colors. Scroll for HTML Razor Code Background, select it and for an Item background choose Custom. Select rgb(30, 30, 30) to match your editor background and make it invisible.