maui: Unable to use custom appicon always defaults to android appicon

This issue has been moved from a ticket on Developer Community.


[severity:It’s more difficult to complete my work] [regression] I have created a .net maui calculator program; when I deploy it to my Samsung S22 phone it always uses the android appicon as the launching icon. I have searched the internet multiple times. Have found multiple entries which points to specifying the appicon in the Resouces\Appicon folder. I have specified the appicon that I want to use in CalculatorConverter.csproj file. I have set the MauiIcon property on the icon file. I have tried multiple files. This problem started after I upgraded to Visual Studio the latest. This calculator app used to work on the previous version that I had. After I upgraded it no longer gave me the option to deploy to my phone so I created new project and copied my files to the new project. It then complained that it couldn’t find items. I found entries that said that there where problems with the path in net9.0 so I again started over and changed to net8.0. Everything seems to work except I cannot get anything but the default android appicon to deploy to my phone. Below is my CalculatorConverter.csproj file. <Project Sdk=“Microsoft.NET.Sdk”>

<Project Sdk=“Microsoft.NET.Sdk”>

<PropertyGroup>
<TargetFrameworks>net8.0-android; net8.0-ios; net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition=“$([MSBuild]::IsOSPlatform(‘windows’))”>$(TargetFrameworks); net8.0-windows10.0.19041.0</TargetFrameworks>
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks); net8.0-tizen</TargetFrameworks> -->

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64; maccatalyst-arm64</RuntimeIdentifiers> -->

<OutputType>Exe</OutputType>
<RootNamespace>CalculatorConverter</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<!-- Display name -->
<ApplicationTitle>CalculatorConverter</ApplicationTitle>

<!-- App Identifier -->
<ApplicationId>com.companyname.calculatorconverter</ApplicationId>

<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<SupportedOSPlatformVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘ios’”>11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘maccatalyst’”>13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘android’”>21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘windows’”>10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘windows’”>10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition=“$([MSBuild]::GetTargetPlatformIdentifier(‘$(TargetFramework)’)) == ‘tizen’”>6.5</SupportedOSPlatformVersion>
</PropertyGroup>

<ItemGroup>
<!-- App Icon -->
<MauiIcon Include=“Resources\AppIcon\appicon.svg” />

<!-- Splash Screen -->
<MauiSplashScreen Include=“Resources\Splash\splash.svg” Color=“#512BD4” BaseSize=“128,128” />

<!-- Images -->
<MauiImage Include=“Resources\Images*” />
<MauiImage Update=“Resources\Images\dotnet_bot.png” Resize=“True” BaseSize=“300,185” />

<!-- Custom Fonts -->
<MauiFont Include=“Resources\Fonts*” />

<!-- Raw Assets (also remove the “Resources\Raw” prefix) -->
<MauiAsset Include=“Resources\Raw**” LogicalName=“%(RecursiveDir)%(Filename)%(Extension)” />
</ItemGroup>

<ItemGroup>
<PackageReference Include=“Microsoft.Maui.Controls” Version=“$(MauiVersion)” />
<PackageReference Include=“Microsoft.Maui.Controls.Compatibility” Version=“$(MauiVersion)” />
<PackageReference Include=“Microsoft.Extensions.Logging.Debug” Version=“8.0.1” />
</ItemGroup>

</Project>

I would appreciate any direction to overcome this issue. I am running Visual Studio Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.12.3 on Windows 10


Original Comments

Feedback Bot on 1/7/2025, 07:05 PM:

We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.

Scott Phillips on 1/29/2025, 09:18 AM:

(private comment, text removed)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (15 by maintainers)

Most upvoted comments

Thanks for letting me know and the help here!

@jfversluis I think this can be closed.

That finally worked… Thankyou!