R – VS2008 crashes with “Fatal Execution Engine Error”

crashvisual studiovisual-studio-2008wpf

Has anybody found a fix for Visual Studio crashing with this error (eventlog)?

.NET Runtime version 2.0.50727.3082 – Fatal Execution Engine Error (7A2E1132) (0)

It does this when I start debugging with a problem in the xaml. Visual Studio will then silently disappear.

I've looked at SO and MS Connect but haven't found a fix or workaround. I often read that you should disable all addins but I don't have any.

EDIT: Yes, I have SP1 and the following fixes installed:

Version 9.0.30729.1 SP

KB944899 KB945140 KB945282 KB946040 KB946308 KB946344 KB946581 KB947171 KB947173 KB947180 KB947540 KB947789 KB947888 KB948127 KB953256 KB956453 KB957912 KB958017

Best Answer

Every time I've seen this, it's because you end up with two different versions of WPF loaded at the same time (i.e. one from GAC and one from Reference Assemblies).

In the .csproj file, is there a line called something to the effect of "Allow XAML to be Compiled in Same AppDomain"? (Sorry I can't actually remember the real name) - Blend likes to put this in and it causes problems.