Sridhar Siddu

Sridhar Siddu

  • NA
  • 147
  • 946

Issue with Resource Dictionary while merging Dlls using ILRepack

Mar 30 2021 10:33 AM

I am merging all my Class Library Projects (ex: LibA.dll, LibB.dll, Sri.Theme.dll) into a single DLL (TestFrame.dll) using ILRepack. I am able to merge all the C# code and also able to access c# logic where ever I use consolidated DLL (TestFrame.dll). But the problem is I have one class library (Sri.Theme.dll) which has WPF Resource-dictionaries, I am not able to call these Resource-dictionaries in my WPF project App.xaml. I have checked TestFrame.dll in ILSpy, these Resource Dictionaries are merged into it. It is giving below error message:

Cannot locate resource 'styles/bootstrap.xaml'.

Sri.Theme project structure will be like this:

enter image description here

  • Styles
  • Themes

I am trying like this in App.xaml in WpfApp1

Try1: <ResourceDictionary Source="pack://application:,,,/TestFrame;component/Styles/Bootstrap.xaml"/>
 
Try2: <ResourceDictionary Source="pack://application:,,,/Sri.Theme;component/Styles/Bootstrap.xaml"/>
 
Try3: <ResourceDictionary Source="pack://application:,,,/TestFrame;component/Sri.Theme/Styles/Bootstrap.xaml"/>
 
Can anyone please help me with this.