Syntax highlighting for html markup disappears in

2019-07-18 11:54发布

This happened to me in Visual Studio 2008 pre and post 2008 sp1 on more than one computer and to someone else I know, so it can't be an isolated incident.

Seemingly random, every so often I lose all syntax highlighting in my aspx page (the html) so that Visual Studio now looks like a really expensive version of notepad.

Does anyone know why does happens? Better yet, anyone know how to fix it?

7条回答
Evening l夕情丶
2楼-- · 2019-07-18 12:00

it happened to me after an uninstall of visual studio using a removal tool at http://msdn.microsoft.com/en-us/vstudio/bb968856.aspx I had to run this before upgrading sql server management studio to 2008 version syntax highlighting has disappeared since because of package loading failures. I didn't find the fix yet so if anybody has an idea...

查看更多
祖国的老花朵
3楼-- · 2019-07-18 12:08

I've followed the instructions from Andrea but had to include the following procedure:

Andrea Instructions: Enter VS2008, click on Tools/Options

Check "Show all settings" option

Choose Environment/International Settings

Change the language combo box.

Close VS2008.

...then... After closing Visual Studio, run this command below from a command prompt with admin permission:

run devenv /resetskippkgs

Reference: http://forums.asp.net/t/1413383.aspx

查看更多
劳资没心,怎么记你
4楼-- · 2019-07-18 12:12

i had the same problem. Installation of DPack

solved this issue

查看更多
\"骚年 ilove
5楼-- · 2019-07-18 12:22

Enter VS2008, click on Tools/Options

Check "Show all settings" option

Choose Environment/International Settings

Change the language combo box.

Close VS2008.

查看更多
够拽才男人
6楼-- · 2019-07-18 12:24

You have basically experienced Visual Studio giving up. It gives up for many reason, the page is too complicated to highlight which is usually because there are too many syntax errors. The highlighting is done with some very complicated and intelligent RegEx statements essentially, however if Visual Studio is unable to apply them it just displays black text.

One thing to try is to fix all the syntax issues, if any.

By the way this "giving up" happens in most IDE's. I have seen it happen once or twice in Elcipse too.

查看更多
甜甜的少女心
7楼-- · 2019-07-18 12:24

Try Ctrl-K, Ctrl-D (reformat document). This will usually restore you syntax coloring. If it doesn't, it should tell you where it got confused (e.g. Couldn't reformat due to line 123).

查看更多
登录 后发表回答