White screen of Darn

Ever had a White screen of Darn (WSOD) in Visual Studio or an error like this: “exception of type system.componentmodel.design.exceptioncollection was thrown” ?

If the [Clean Solution] and [Rebuild Solution] didn’t work.
Here is how to find the culprit:

  1. Open Visual Studio 2010 and open/load your solution containing the problem
  2. Open a second Visual Studio 2010 instance

In the second VS2010 instance do the following things:

  1. Go to [Tools] > [Attach to Process...]
  2. Select devenv.exe with which contains the solution with the problem from the Available Processes and click OK
  3. Next go to [Debug] > [Exceptions...]
  4. Check [Common Language Runtime Exceptions] in the [Thrown] column

Now go to your first Visual Studio 2010 instance with your project and open the designer file which causes you the PITA (Pain In The Ass).

Your second VS2010 instance should break on the exception, showing you where it goes wrong in your code.

Enjoy ;)