Xerratus
Happily stressed out, since 1974


 
Friday, March 28, 2008
<< Green Beer-a-licious
Fix for invalid character in sproc calling sp_xml_preparedocument that has valid vs.NET xml >>

The other day, Visual Studio 2005 threw an odd error, seemingly out of the blue, that stated something to the effect "Error loading property page" (sorry didn't grab a screen shot of it because I didn't think it was anything) while trying to open a config file.  After clicking "OK", the file opened without any formatting, just black and white text.  To say the least, I was a little bummed; I love formatting.



Unfortunately, the day it happened, I was a bit swamped with work.  In all actuality, this happened over two weeks ago, I've just been too busy to look into it.  This morning however, I decided to take a few minutes before my day got started and look into fixing this problem.  First off, I wasn't sure what to Google and the vague things I could come up with were yielding little useful results.  I then decided to see if I could see if Visual Studio could tell me anything further.

I opened up "options", selected "Text Editor" then "XML".  The general property page seemed fine.  I then clicked on the "Formatting" option and there it was: "an error occurred loading this property page".  I now had something to search for.



Going back to Google, I searched for visual studio 2005 options xml formatting "an error occurred loading this property page" and the first result was this forum post which held the answer by Benson Yu - MSFT.
The issue was resolved by running “devenv /setup” in Visual Studio 2005 Command Prompt.
Nice!  So, I tried it out.



Note: I did this while Visual Studio was open and yes, it worked without needing to close it.

After the command prompt ran (which did take a minute or two, so be patient) I went back to Visual Studios XML formatting option and saw that my options were there again.



The web.config file I had opened was still black and white, so I closed and reopened it and my formatting was returned.



All is well again... now, back to work.