Giovanni Galbo
Giovanni Galbo

Reputation: 13091

Syntax highlighting for html markup disappears in Visual Studio 2008

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?

Upvotes: 2

Views: 2600

Answers (7)

Makiyama
Makiyama

Reputation: 21

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

Upvotes: 1

Andrea
Andrea

Reputation: 1

Enter VS2008, click on Tools/Options

Check "Show all settings" option

Choose Environment/International Settings

Change the language combo box.

Close VS2008.

Upvotes: 0

Eldar
Eldar

Reputation: 872

i had the same problem. Installation of DPack

solved this issue

Upvotes: 0

morgan
morgan

Reputation:

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...

Upvotes: 3

Herb Caudill
Herb Caudill

Reputation: 50002

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).

Upvotes: 1

cowgod
cowgod

Reputation: 8676

when this happens to me, i let it sit there for a minute. it will usually bring the syntax highlighting back.

Upvotes: 0

Nick Berardi
Nick Berardi

Reputation: 54894

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.

Upvotes: 3

Related Questions