0

我正在使用 ILRepack 将我的所有类库项目(例如:LibA.dll、LibB.dll、Sri.Theme.dll)合并到一个 DLL(TestFrame.dll)中。我能够合并所有 C# 代码,也能够在我使用合并的 DLL (TestFrame.dll) 的地方访问 c# 逻辑。但问题是我有一个具有 WPF 资源字典的类库 (Sri.Theme.dll),我无法在我的 WPF 项目 App.xaml 中调用这些资源字典。我在 ILSpy 中检查了 TestFrame.dll,这些资源字典被合并到其中。它给出以下错误消息:

找不到资源“styles/bootstrap.xaml”。

Sri.Theme 项目结构如下:

在此处输入图像描述

  • 风格
  • 主题

我在 WpfApp1 的 App.xaml 中尝试这样

尝试1: <ResourceDictionary Source="pack://application:,,,/TestFrame;component/Styles/Bootstrap.xaml"/>

尝试2: <ResourceDictionary Source="pack://application:,,,/Sri.Theme;component/Styles/Bootstrap.xaml"/>

尝试3: <ResourceDictionary Source="pack://application:,,,/TestFrame;component/Sri.Theme/Styles/Bootstrap.xaml"/>

谁能帮我解决这个问题。原谅我语言不好

4

0 回答 0