visual-studiomauivisual-studio-mac

Publishing .NET MAUI app in Visual Studio for Mac


I'm using Visual Studio for Mac 17.4 (Build 2406) and trying to create a package that I can upload to AppStore.

I'm not sure if we can now use Visual Studio to do this or we still need to use the termainal.

This is a .NET 7 based .NET MAUI app so I modified the command I used to use to create a package but it's giving me an error.

The command I used in termainal is:

dotnet publish -f:net7.0-ios -c:Release

This gives me the following error:

A runtime identifier must be specified in order to publish this

What am I missing here?


Solution

  • Looks like, we still create the package through .NET CLI using the following command -- notice the addition of runtime identifier:

    dotnet publish -f:net7.0-ios -c:Release /p:RuntimeIdentifier=ios-arm64