.NET MAUI merged dictionaries missing on Android

211 Views Asked by At

I have 4 resource files that are in the Application's dictionary. Each one is in the same folder and has Build Action set to MauiXaml.

<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:CMO3"
             x:Class="CMO3.App">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
                <ResourceDictionary Source="Resources/Styles/CMOColors.xaml"/>

                <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
                <ResourceDictionary Source="Resources/Styles/CMOStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>

With .NET MAUI running on Windows I can see all of them. enter image description here

When I point Visual Studio at my Samsung S20 FE 5G, the same line of code only sees one of them. enter image description here

The one that shows up is the first one: Colors.xaml that come with default MAUI projects. I could merge all of them myself but I'm mystified why MergedDictionaries isn't working on Android.

0

There are 0 best solutions below