I searched Tools > Options, but where in VS10 can I turn off or change the default highlighting for the new Razor view on the @nuggets in ASP.NET MVC 3?
相关问题
- Visual Studio 2010 randomly says the command line
- (ASP.NET) Project file must include 'WindowsBa
- Entity Framework throws exception - Network Relate
- Partial Form Class C# - Only display code view for
- Slow loading first page - ASP.NET MVC
相关文章
- How to show location of errors, references to memb
- “Dynamic operations can only be performed in homog
- Log4Net Multiple Projects
- Compiling error in C++ project with C and C++ code
- How to use Mercurial from Visual Studio 2010?
- Change color of bars depending on value in Highcha
- How to get server path of physical path ?
- VSIX: execute code on VS startup
In Visual Studio 2015
Tools -> Options -> Environment -> Font and colors
The name of the property is
HTML Razor Code Background
Change the Item background to the color you like.The syntax highlighting for razor is based on the c#/VB default highlighting. So you'll have to change those settings to see any changes in a cshtml file highlighting. Might be a good feature request...I don't know.
Razor only adds one entry to Fonts & Colors, "Razor Code". That controls the background color given to Razor Code nuggets. The rest of the colors are the same as the C#/VB colors. The "@" character itself and Razor keywords like "model" and "section" use the same color as the ASPX "<%" tag ("HTML Server-Side Script", thanks to another Andrew for digging up the specific entry).
If you'd rather we had separate entries for some of these, please email us and suggest that: razorvs@microsoft.com