In my case,
1)Open my .csproj file.
2)Find these lines.
<ItemGroup>
<MauiXaml Remove="Resources\Styles\Styles.xaml" />
<MauiXaml Remove="Resources\Styles\Colors.xaml" />
</ItemGroup>
3)Delete them.
But,I don't know when or how these lines added.
Why is Maui's "Colors.xml" not found building with Visual Studio Mac but is with Visual Studio Windows?
Marc George
171
Reputation points
Using VS Mac 17.6 Preview 2, building a MAUI application, it is responding with "Resource "Resources/Styes/Colors.xml" not found (XFC0124)" as an error. Building the exact same code, just copied to the Mac for its build, with VS Windows 17.6.0 Preview 1.0, the build is successful and deploys to an iPhone. Why?
The code with the error is the App.xml file.
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:Sentry"
x:Class="Sentry.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
2 answers
Sort by: Most helpful
-
no-more-moire 10 Reputation points
2023-06-18T00:48:40.56+00:00 -
randayossry-8690 0 Reputation points
2023-06-18T01:02:22.8633333+00:00 How do I get followers?