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?
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...
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
i had the same problem. Installation of DPack
solved this issue
Enter VS2008, click on Tools/Options
Check "Show all settings" option
Choose Environment/International Settings
Change the language combo box.
Close VS2008.
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.
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
).