Solving Visual Studio 2008 project creation/loading issues

Posted: (EET/GMT+2)

 

Today for some reason, Visual Studio 2008 SP1 in one of my virtual machines I use for testing stopped working. I still fail to understand why this actually happened, but it might be because of an incompatible application install, a Windows update, or something similar. The symptoms in Visual Studio were the following. When starting Visual Studio, I got the following error:

---------------------------
Microsoft Visual Studio
---------------------------
Package Load Failure

Package 'Windows Forms Designer Hosting Package' has failed to load
properly ( GUID = {68939055-38E0-4D17-92CB-8909710D8178} ). Please contact
package vendor for assistance. Application restart is recommended, due to
possible environment corruption. Would you like to disable loading this
package in the future? You may use 'devenv /resetskippkgs' to re-enable
package loading.
---------------------------
Yes   No   
---------------------------

When Visual Studio find a problematic package, it asks whether you want to disable it from that point on. Clicking Yes will move the package to a list of disabled packages, and thus when you re-launch Visual Studio, that package isn't loaded anymore. The re-enable loading of failes packages, run DevEnv.exe (the IDE loader) with the "/resetskippkgs" switch. DevEnv.exe by default sits in the directory "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE".

Of course, I thought this would be a temporary problem, but it wasn't. I tried opening or creating new projects, and I always got the following error:

---------------------------
Microsoft Visual Studio
---------------------------
Project 'ConsoleApplication1' could not be opened because the Microsoft
Visual C# 2008 compiler could not be created. QueryService for
'{74946829-37A0-11D2-A273-00C04F8EF4FF}' failed.
---------------------------
OK   
---------------------------

Because even rebooting didn't help, I ended up uninstalling and then re-installing Visual Studio 2008. This actually didn't work, because the Web Authoring Components failed to uninstall properly.

I ended up brutally deleting the offending folders from C:\Program Files, after which I did a new installation. Not very neat, but problem solved!