No icon when dotnet publish .net maui mac catalyst app

Eigil Krogh Sorensen 96 Reputation points
2024-03-02T17:35:10.3533333+00:00

When I use this command to publist a .net maui ac catalyst app for Ad Hoc

`dotnet publish ChronoWiz/ChronoWiz.csproj -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:CodesignKey="Apple Development: Eigil Krogh (M39X...)" -p:CodesignProvision="ChronoWiz Profile Development MAC" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.Release.plist" -p:UseHardenedRuntime=true -o "/Applications"

`

or this command to publist a .net maui ac catalyst app for App Store

`dotnet publish ChronoWiz/ChronoWiz.csproj -f net8.0-maccatalyst -c Release -p:MtouchLink=SdkOnly -p:CreatePackage=true -p:EnableCodeSigning=true -p:EnablePackageSigning=true -p:CodesignKey="Apple Distribution: Eigil Krogh (4657Q2...)" -p:CodesignProvision="ChronoWiz Profile App Store MAC" -p:CodesignEntitlements="Platforms\MacCatalyst\Entitlements.Release.plist" -p:PackageSigningKey="3rd Party Mac Developer Installer: Eigil Krogh (4657Q...)" -o "/Applications"

`

Then the resulting app, ChronoWix.apps" has no icon.

What can be the reason for that. If I just

`

dotnet build ChronoWiz/ChronoWiz.csproj -f net8.0-maccatalyst

`

then the .app has icons.

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Eigil Krogh Sorensen 96 Reputation points
    2024-03-05T08:28:51.9933333+00:00

    The solution for me is: Enter the name of the icon file in

    ...Platforms/MacCatalyst/Info.plist
    

    The solution for me is: Enter the name of the icon file in ...Platforms/MacCatalyst/Info.plist like this:

    <key>CFBundleIconFile</key>
    <string>appicon</string>
    <key>CFBundleIconName</key>
    <string>appicon</string>
    
    1 person 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.