I have this problem as well. Reverting to IE7 resolves it, but it's a real pain.
We've recently installed IE8 and now have the same behavior in the VS 2005 WinForms designer error screens - we see unformatted HTML instead of the the nicely formatted error screen with the red bar. Has there been a fix discovered for this?
Got something for you. Not a fix, but a workaround: When the unformatted HTML appears - press F5
I was able to fix this by adding a new subkey to the registry for .tmp and copying settings from .html. After these changes have been made, designer errors in Visual Studio should be rendered instead of displaying the HTML code for the error.
- Open HKEY_LOCAL_MACHINE\SOFTWARE\Classes and add a new subkey of type .tmp.
- Change the data of the (Default) value to: htmlfile
- Add a new string value of Content Type with data of text/html
- Add a new string value of PerceivedType with data of text
The problem actually is "The class Form1 can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again. "
So I've moved Form1 class in the beginning of the file (I've created several classes before it manually) - it works! Don't do anything with IE.