I would like to change the yellow background color of the Razor tags in VS12.
How to change Visual Studio 2012 Razor colors
Asked Answered
Optional: Install the color theme editor: http://visualstudiogallery.msdn.microsoft.com/366ad100-0003-4c9a-81a8-337d4e7ace05
In the theme editor or Tools > Options > Environment > Fonts and Colors
Search for: 'HTML Server-Side Script' to edit the foreground & background of @
and other tags.
Search for: 'Razor Code' to edit the background of the Razor code.
VS2013 appears to have change this from "Razor Code" to "HTML Server Code Block Background". –
Gca
And VS2013 Update 2 seems to have changed this to "HTML Razor Code Background". –
Custom
For VS2013 Update 4, it is "HTML Server Code Block Background". One more thing, if you don't see the color change immediately after saving, restart VS once and check again (I had to restart VS for the change to take effect). –
Arv
Besides the way that @seanjacob mentioned, there's a built-in way if you'd rather not install an extension just to change Razor colors. This approach is shown in this answer.
Color Theme Editor for Visual Studio 2017
and you can follow the same instructions as seanjacob's post
© 2022 - 2024 — McMap. All rights reserved.