I have a Solution with multiple Projects in it. One of them is a Common Project that all other Project have a reference to. In this, I defined some WPF styles and converter and such. I use theese styles from a diffrent Project like this:
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/CommonDriverInterface;component/Style/Style.xaml" />
</ResourceDictionary.MergedDictionaries>
This works fine and i can use Styles from all diffrent Projekts without Problems.
What I want now is that one of my Projects, lets say Project X, loads those resources when Building, so that the X.dll that is resulting of this Project works on is own with the styles that it gets from the Common Project. I use the X.dll on its own with a diffrent script, and also open a Window there, but when it tries to open the window the application crashes at this line:
<ResourceDictionary Source="pack://application:,,,/ABUToolsCommonDriverInterface;component/Style/ABUToolsStyle.xaml" />
Because that is a reference to a diffrent Project, not within the X.dll I think loading the Resources when Building should solve my Problem, but I am not sure how to load it when Building so that the X.dll contains the styles.
Edit: The Project X has no App.xaml in it