App icon not showing in the correct size in Maui

Heinz Deubler 181 Reputation points
2022-12-04T21:43:45.073+00:00

My .SVG app icon is not showing correctly in my Maui app.

The icon in my Maui app it looks like this: This Icon if from when I wrote the app in Xamarin on VS 2019.
266936-good.jpg

This is how the image shows in my Maui appL 266927-wrong.jpg

I made the following edits in the project file.

<MauiIcon Include="Resources\AppIcon\appicon.svg" Foreground="Resources\AppIcon\appiconfg.svg" Color="#FFFFFF" />

Both the appicon.svg and the appiconfg.svg are the same file with different file names. (I don't understand why there are 2 files).

The property on both icons is set to MauiIcon

I cleaned the project and deleted the obj and bin folders several times.

The icon has been created by converting a .pgp file to and SVG file.

I am running Windows 10, VS 2022 Version 17.5.0 Preview 1.0

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,449 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jörg Thomas 20 Reputation points
    2023-03-06T14:28:47.54+00:00

    <MauiIcon Include="Resources\AppIcon\appicon.png" ForegroundScale="0.65" />

    4 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.