I have a fairly large ASP MVC project which I am running in visual studio 15.4.5. Whenever I view .cshtml files Visual Studio incorrectly highlights the file for example:
I found this question whilst trying to solve the nuisance that is the highlighting myself so thought I'd share my findings. Apparently this is the intentional behaviour as it referred to as "Razor Syntax Highlighting" and through both this post on MSDN and another question on here: How do you turn off Razor highlighting in VS 2013? I was able to determine how to turn it off on my machine.
Quote from MSDN post:
This highlighting is the built in support for Razor syntax highlighting. If you do not like it, you can open your .cshtml files in Visual Studio using the HTML editor
Screenshot of what I changed that worked for me:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With