Closed
Description
NativeAOT is broken for Apple TFMs after #46070.
Now the following fails:
dotnet build
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0-ios</TargetFramework>
<PublishAot>true</PublishAot>
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack>
</PropertyGroup>
</Project>
with:
error NETSDK1225: Native compilation is not supported when invoking the Publish target directly. Try running dotnet publish.
and this fails:
dotnet build
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0-ios</TargetFramework>
<PublishAot>true</PublishAot>
<PublishAotUsingRuntimePack>false</PublishAotUsingRuntimePack>
</PropertyGroup>
</Project>
with:
error NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier 'iossimulator-arm64'.
In the past we've automatically set PublishAotUsingRuntimePack=true
(always, not only for publish), which I believe we're still supposed to do.
Note: this effectively breaks NativeAOT support in .NET 10 Preview 1 for us.