Cross Framework Resource Dictionaries? RRS feed

  • Question

  • Hello,

    Using VS2012 WPF, I am creating a Prism application that has it's "Shell" as a .NET 4.5 application which references a shared .NET 4.0 library.  Inside the .NET 4.0 library, I have some Styles defined.  When I setup the Merged Dicitonary, I get an error "Resource Dictionary 'pack://application:,,,/MyDll;component/themes/default.xaml' defined in a '.NETFramework,Version=v4.0' cannot be used in a '.NETFramework,Version=v4.5' project.", but the code works fine (style is applied).

    I just wanted to see if this is by design and if so why?

    Here is some code:

                    <ResourceDictionary Source="pack://application:,,,/MyDll;component/themes/default.xaml" />
            <TextBlock Text="Hello World" Style="{StaticResource HelloWorldTextStyle}" />

    Monday, November 19, 2012 7:16 PM