为什么IE不显示我的WPF组件?

时间:2014-06-19 13:57:24

标签: wpf internet-explorer xaml blend

我使用WPF控件库组件创建了一个组件。在blend和Visual studio中,它按预期工作,但是当我用IE打开xaml文件时,我无法在IE上工作。

你可能会问自己“为什么他需要让它与IE一起工作?”。这很简单:我们使用的是HMI SCADA软件:Zenon(Copa Data)。该软件应该支持WPF组件。要验证该组件是否可以在该软件中运行,他们会告诉他们在文档中使用IE进行测试。

当然,我尝试在使用IE进行测试之前直接在Zenon中导入WPF组件,但它无效。

这是xaml文件:

<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:lib="clr-namespace:ListeImitationMobileWPF;assembly=ListeImitationMobileWPF"
        Height="Auto" Width="Auto">
    <lib:MaListeMaintenance/>
</UserControl>

ListeImitationMobileWPF是WPF控件库,其中包含组件“MaListeMaintenance”。

来自IE的错误:“标签'MaListeMaintenance'在XML命名空间中不存在''clr-namespace:ListeImitationMobileWPF; assembly = ListeImitationMobileWPF'。”

(法语翻译,我不知道它是否是确切的英文错误信息,原文:System.Windows.Markup.XamlParseException:La balise'MaListeMaintenance'n'existe pas dans l'espace de noms XML'clr - 命名:ListeImitationMobileWPF;装配= ListeImitationMobileWPF”)

编辑:我试图把.dll放在同一个文件夹中,但它仍然给我这个错误

Edit2:更多信息:lib已使用4.5.1 dotnet框架编译,VS / blend 2013.如果您需要更多信息,请向我询问。谢谢

Edit3:更多信息:lib只包含一个包含Button的UserControl。没有其他的。 IE似乎无法查看我的dll,Zenon也是如此。在标准项目中,您必须将库添加到项目引用中,以便他可以找到它。我不知道如果没有项目我怎么能模仿这个。

1 个答案:

答案 0 :(得分:1)

好的问题是,Zenon无法处理比3.5更新的dotnet框架版本。谢谢大家阅读我的问题。