Echo
Echo

Reputation: 319

Is .NET 7 native AOT supported on macOS?

There isn't any information about the macOS platform. Has AOT supported it, or is there a plan?

Upvotes: 3

Views: 1879

Answers (4)

Joubert Nel
Joubert Nel

Reputation: 3214

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

Upvotes: 0

Echo
Echo

Reputation: 319

enter image description here

the mac platform is on the way

Upvotes: 0

Guru Stron
Guru Stron

Reputation: 142413

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.

Upvotes: 0

Jay
Jay

Reputation: 10128

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.

Upvotes: 5

Related Questions