Hello,
We cannot add the icon in command line.
However, before running dotnet publish
command line, you can put icon in the Resources\AppIcon\
folder,then double click your project name in VS, open the yourproject.csproj
file, you can find the MauiIcon
and change the icon path.
<!-- App Icon, my test icon name is icon1.png-->
<MauiIcon Include="Resources\AppIcon\icon1.png" />
Here is detailed document about:Change MAUI the icon
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.