Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Tuesday, January 20, 2009

Exception of type 'System.ComponentModel.Design.ExceptionCollection' was thrown

Sometimes I get the message "Exception of type 'System.ComponentModel.Design.ExceptionCollection' was thrown" When trying to open a Form in designer view.
The real problem of the "ExceptionCollection" being thrown is that when there is a WSOD (White Screen of Darn) indicating a designer load issue, the designer gets unloaded. These get caught by the unload method and get displayed in the dialog box you see.
So, to fix this you should:
* Attach a visual studio debugger to VS. Turn on exception catching when first thrown (in the Debug|Exceptions menu).
* Open the designer with the debugger attached
* Determine what component is throwing the exception.

Sometimes you cannot open the form design view because of a missing resource file or an invalid reference in the design code unit.

Monday, November 10, 2008

Unable to open Server Explorer in Visual Studio

When server explorer doesn't open when clicking on the menu option View|Server Explorer, the first solution is to run the command /ResetSkipPkgs on the visual studio command prompt. Open a development command line window by clicking on the Start|Programs|Microsoft Visual Studio 2008|Visual Studio Tools|Visual Studio 2008 Command Prompt shortcut.
Type devenv /resetskippkgs in there. What /ResetSkipPkgs does is that it clears all options to skip loading added to VSPackages by users wishing to avoid loading problem VSPackages, and then starts Visual Studio. The presence of a SkipLoading tag disables the loading of a VSPackage; clearing the tag re-enables the loading of the VSPackage.

If this doesn't work, then reinstall the visual studio again.