Failed to merge ResourceDictionary from referenced project

I have two assemblies, each of which provides a common set of styles and resources that I want to include in my application. I use federated dictionaries in mine App.xamlto load them, and at runtime they were fine. Unfortunately, these resources will not be loaded during development, filling the "Errors" window with messages about unsolvable resources and providing me with an interface that does not reflect what will actually appear.

This is my App.xaml as it stands right now:

<Application x:Class="ClientDebug.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             >
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Dai.Common;component/Xaml/Common.xaml" />
                <ResourceDictionary Source="/Dai.DevExpress;component/Xaml/Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

For both of these combined dictionaries, I get the following errors in the Errors window:

Error   11  An error occurred while finding the resource dictionary "/Dai.Common;component/Xaml/Common.xaml".   C:\DevProjects\Core Application\ClientDebug\App.xaml    12  17  ClientDebug
Error   12  An error occurred while finding the resource dictionary "/Dai.DevExpress;component/Xaml/Styles.xaml".   C:\DevProjects\Core Application\ClientDebug\App.xaml    13  17  ClientDebug

, , . , , , .

+5
4

, WPF , . , ! , Visual Studio , ?

, Xaml . , , , . Inelegant App.Xaml , , , Visual Studio .

+1

"pack://application:,," :

        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/Wsi.Util;component/DataGrid/NameValueDataGridDictionary.xaml" />
            <ResourceDictionary Source="LayoutStylesDictionary.xaml" />
            <ResourceDictionary Source="pack://application:,,,/Wsi.Util;component/controls/ToolBarResources.xaml" />
            <ResourceDictionary Source="pack://application:,,,/Wsi.Common;component/view/themes/FilterStylesResourceDictionary.xaml" />
        </ResourceDictionary.MergedDictionaries>

,

Janene

0

, , , . ( , , , , , ..) , , - xamls - ? , ( ). , xaml xaml ( , , ..). (, , MahApps.)

  <Application.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colours.xaml" />
            <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
            <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
            <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
            <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </Application.Resources>
0

, .

: , , , .

:

  • ""
  • " "
  • Select '<New ...>' in the combo box
  • Enter a name, for example. 'keyfile' ('Protect my key file with password' is optional)
  • Reconstruction
0
source

All Articles