- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.2k
Closed
Labels
Area-NativeAOTNative AOT compilationNative AOT compilationuntriagedRequest triage from a team memberRequest triage from a team member
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.
ivanpovazan
Metadata
Metadata
Assignees
Labels
Area-NativeAOTNative AOT compilationNative AOT compilationuntriagedRequest triage from a team memberRequest triage from a team member