There is no information about the macOS platform. Has AOT supported it, or is there any plan?
Is .NET 7 native AOT supported macOS?
1.5k Views Asked by Echo At
4
There are 4 best solutions below
0
On
At the moment the official docs state Native AOT support only on Windows and Linux for .NET 7:
The following table shows supported compilation targets when targeting .NET 7.
| Platform | Supported architecture |
|---|---|
| Windows | x64, Arm64 |
| Linux | x64, Arm64 |
But based on the issues/discussions in the github repo (for example this, this and especially this one) the working is going on for future releases to support Native AOT on macOS.
0
On
As of .NET 8, AOT compiled binaries for macOS are supported for both arm64 and x64 architectures. Source: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/?tabs=net8plus%2CmacOS#platformarchitecture-restrictions
Do some project setup first.
Example invocation:
dotnet publish -r osx-arm64 -c Release

At time of writing, the only supported targets according to MS docs are Windows and Linux - see https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/#platformarchitecture-restrictions
Screenie for posterity:
This doesn't answer your question about whether there are plans to support it on MacOS - maybe someone else has that info.