Is .NET 7 native AOT supported macOS?

1.4k views Asked by At

There is no information about the macOS platform. Has AOT supported it, or is there any plan?

4

There are 4 answers

0
Echo On

enter image description here

the mac platform is on the way

0
Jay On

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: enter image description here

This doesn't answer your question about whether there are plans to support it on MacOS - maybe someone else has that info.

0
Guru Stron 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
Joubert Nel 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