【问题标题】:WPF .xaml designer exceptionWPF .xaml 设计器异常
【发布时间】:2014-03-28 09:28:48
【问题描述】:

我正在开发 WPF 桌面应用程序,我在我的 xaml 设计器预览中收到此错误。我浏览了很多链接,但无法弄清楚。

之前也有人提出过同样的问题。 Unidentified Resource by the URI 但是我仍然无法解决它。我还在下面附上了图片。

这是完整的错误:

Exception: The component 'Microsoft.Expression.Utility.ValueEditors.SplitComboBox' does not have a resource identified by the URI '/Microsoft.Expression.Utility;component/valueeditors/splitcombobox.xaml'.

而且,我正面临着警告信息。

Warning 7   There was a mismatch between the processor architecture of the   project being built "MSIL" and the processor architecture of the reference "Microsoft.Expression.Utility, Version=5.0.30709.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.    Predictions Version 1

为了解决上述警告,我经历了这个link,但都是徒劳的。

程序运行良好,但我需要实施设计更改并观察更改,我必须一次又一次地运行程序,因为设计预览不起作用。

另请注意,当我包含 ma​​happs.metro 库时,它开始发生。 如果需要,我可以粘贴我的 .xaml 文件。我正在使用VS2012。 提前致谢。

【问题讨论】:

    标签: c# wpf xaml visual-studio-2012 mahapps.metro


    【解决方案1】:

    就我而言,删除下面的引用解决了这个问题。 我不知道是哪一个导致了异常。

    • Microsoft.Expression.Blend
    • Microsoft.Expression.Interactions
    • System.Windows.Interactivity

    【讨论】:

    • 我不确定在您的情况下是否仍然可以重新创建,但有什么方法可以缩小导致异常的引用范围?
    • 对我来说,Microsoft.Expression.Utility 引用是导致此问题的原因。
    猜你喜欢
    • 2012-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-04
    • 1970-01-01
    • 1970-01-01
    • 2016-04-21
    • 1970-01-01
    相关资源
    最近更新 更多