Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.ComponentModel.Design.ExceptionCollection

Tags:

I'm using the Ribbon control located on CodePlex, and following the tutorial located here . Once I add the reference, and the proper code in the designer I get this error when I try to view the form:

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

And I cant figure out what I'm doing wrong. Anyone worked with this control and know how to resolve this issue?

like image 427
PsychoCoder Avatar asked Mar 06 '12 07:03

PsychoCoder


1 Answers

Interesting; I just ran into this same issue with one of my own forms; which is how I found your relevant and recent question.

Here's how I solved it:

  1. Open two instances of Visual Studio. Open the same project in both.
  2. In one instance, goto Debug->Exceptions and enable all the 'Thrown' options to stop at first chance exceptions. This will stop the debugger when the exception is generated.
  3. In the same instance, select Debug->Attach to Process, select devenv.exe.
  4. In the other instance, open the form to cause the exception
  5. With any luck the first instance should stop somewhere that yields a more relevant exception.

In my case it turned out to be something that I should have conditioned with:

if (!DesignMode) {   // Do something that should only happen at runtime } 

Don't forget turn turn off all those 'Thrown' options later.

like image 119
pilotcam Avatar answered Sep 29 '22 13:09

pilotcam