سؤال

I'm working on a web project in Visual Studio 2013 and I'm not able to see the classic colors for HTML tags (Maroon, Blue and Red). Instead all the HTML is black, except the Razor blocks, they show ok. When I go to the Fonts options the colors are configured correctly but the editor seems to not consider the configuration values.

Any help would be appreciated.

هل كانت مفيدة؟

المحلول

Do you mean that the source code doesn't have syntax highlighting within the Visual Studio editor, outside of the Razor blocks?

It's possible that your default editor for cshtml files got switched to the wrong one somehow. Try right-clicking one of the cshtml files in question, doing an "Open With...", and choosing "HTML Editor".

If that doesn't work, try disabling any extensions you have installed that touch the HTML editor (e.g. Web Essentials, Productivity Power Tools, Indent Guides, etc).

If that doesn't work, I'd try resetting your settings from Tools > Import and Export Settings... > Reset all settings. You can back your settings up first, so you can restore them afterward if resetting them doesn't help.

Finally, if none of that works, I would try running a repair on Visual Studio from the installer. I've seen that fix strange issues like this before.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top