Memetisch

Dein Weltmodell ist deine Realität

Just a little note to myself and maybe some other guys out there with the same problem.Flaming truck

When the Visual Studio 2008 / 2010 designer shows you the forms and controls, it executes certain code to show them to you. When it crashes, you should look on which form it crashed and then inspect this form very closely, including all their fields.

The error can be in the constructor of the form, in the constructor of the custom controls you’re using and in the OnPaint() events of either forms and controls. Make sure you’re either encapsulating all these with try-catch-blocks so you can at least track down the problem and not have Visual Studio crash on you each time you try.

(If you know other sources of VS designer crashes, please post a comment)
Creative Commons License photo credit: selva

2 thoughts on “Visual Studio Designer Crashes

  1. I found a piece of code that was causing this to happen, it was seemingly unrelated to the design view but removing it caused the problem. After doing this I cleaned the solution, reset all Visual Studio settings and rebuilt the entire solution. For some reason this fixed the problem. To find the code that was causing the break I followed instructions found on the Silverlight forums.

    “Try this to get a stack trace of error. Open up 1st solution but don’t call up XAML that crashes it. Open 2nd instance of VS2010, and debug the process of the first. Go into debug option and uncheck “Just my code” in Debug options. Additionally go to Debug exceptions and check the Managed code option as well as the UnManaged code options. Now go back to first instance and recreate error.”

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Back to top