Q:

XAML Pages shows Exception Message On Visual Studio 2008

I am working on a WPF App which has been working fine for some time. Recently, the XAML user controls do not show up properly on Visual Studio 2008 though the Application runs fine. It shows a long list of Exception messages. For convenience, some of the messages are listed below.

Exception has been thrown by the target of an invocation.
Exception has been thrown by the target of an invocation.
'/Microsoft.Windows.Design.Developer;component/themes/GridAdorners.xaml'
  value cannot be assigned to property 'Source' of object
  'System.Windows.ResourceDictionary'. Cannot create instance of
  'GenericTheme' defined in assembly
  'Microsoft.Windows.Design.Interaction, Version=3.5.0.0,
  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Exception has been
  thrown by the target of an invocation.    Error at object
  'ResourceDictionary_4'.
Cannot create instance of 'GenericTheme' defined in assembly
  'Microsoft.Windows.Design.Interaction, Version=3.5.0.0,
  Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Exception has been
  thrown by the target of an invocation.

Just to add, recently I have upgraded into Expression Blend 3  from Expression Blend 2. Not sure if the issue is related though.

A:

Do this:

Open your solution in Visual Studio.
Open the same solution in Blend, but not yet open any files.
Attach the VS debugger to Blend and break on all managed runtime exceptions.
Open the problem file. You should now see what code is throwing which exception.

Caveat emptor: I do this all of the time with VS2010/Blend 4, but haven't tried it with VS2008/Blend 3.

