gpt4 book ai didi

c# - 无法加载文件或程序集 'WPG, PublicKeyToken=null' 或其依赖项之一

转载 作者:行者123 更新时间:2023-12-02 15:38:50 27 4
gpt4 key购买 nike

我正在使用 PRISM 和我在 CodePlex 中找到的新控件:WPF 属性网格

http://wpg.codeplex.com/

当我测试 DEMO 时,一切进展顺利。

我还没有开始使用 PRISM。如果我将控件放在 Shell 中,也可以很好地工作。问题是如果我将控件放入模块中,它会引发错误。

Could not load file or assembly 'WPG, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

我真的不知道这个错误。有人知道如何修复它吗?

enter image description here

编辑:

<UserControl x:Class="ConfigurationManagerModule.Views.ConfigurationView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:prism="http://www.codeplex.com/prism"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpg="clr-namespace:WPG;assembly=WPG"
>

这个用户控件是模块的一部分

最佳答案

确保您的引用文献设置正确。当项目 B 在 XAML 中使用程序集(如 WPG),但项目 A 实际上创建了项目 B 类的实例时,我遇到了此问题。为了使 XAML 解析器以这种方式工作,必须将 WPG 引用添加到项目 A。在项目 A 中引用项目 B 是不够的。

关于c# - 无法加载文件或程序集 'WPG, PublicKeyToken=null' 或其依赖项之一,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9552086/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com