开发者

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=b开发者_如何学运维03f5f7f11d50a3a'. 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.


Do this:

  1. Open your solution in Visual Studio.
  2. Open the same solution in Blend, but not yet open any files.
  3. Attach the VS debugger to Blend and break on all managed runtime exceptions.
  4. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜