14.10.08

Workaround?: WPF XAML designer silent crash in vs2008 SP1

Maybe I’m just lucky. I hope that it is based on my developer fortune and not that Visual Studio 2008 SP1 is a piece of dunebuggy code…

I installed the newly released SP1 (I had skipped the SP1 beta1 and beta2) and then tried to open a WPF project that I had created in straight vs2008. Anytime that I was so bold as to open an XAML file in the designer, VS paused for a moment and then died.

<RANT>Forget the Vista niceties of noticing the crash and tallying the crash against the “stability” of my system. No. This is a Microsoft product. We can’t have Visual Studio show up on the list of shifty programs.</RANT>

I thought about it a bit and tried a few things. Each attempt was rewarded with a silent crash except the last:

WORKAROUND (SO FAR): Create a new WPF Window (or control). For me, this process took inordinately long, and then the new Window/Control showed up. After that point, I could easily view and edit my other XAML files in the designer. Grrr. Yay!

Update: A couple folks have also posted comments detailing how they got things to "refresh" and stop crashing:

  1. Open documents in full XAML view (avoiding the crash when the control displays in the designer?) (Thanks Brad)
  2. Opened AppConfig.xaml (Which is XAML but has no controls to display in the designer) (Thanks Vasco)

Update 2: A patch is available for the XAML designer in Visual Studio 2008 SP1.

3 comments:

  1. A co-worker of mine just had the same issue. I posted a possible work around by opening documents in full XAML view on my blog http://team.interknowlogy.com/blogs/bradcunningham/default.aspx

    ReplyDelete
  2. Thanks brad, that may be a useful way to deal with designer problems in the future. (Or to avoid slowdowns when you just want to hack XAML).

    UPDATE: I only had to do the "create WPF Window" operation once, and haven't had any further issues. Evidentally the WPF Window wizard in VS 2008 fixed/fixes something that was hosed up in my installation. Go figure...

    ReplyDelete
  3. An interesting identical case also happened to me:

    http://vascooliveira.com/Blog/archive/2008/12/18/vs-2008-sp1-silent-crash-of-death.aspx

    ReplyDelete