Skip to content

The ResolveReadyToRunCompilers task fails when building for mobile platforms #122985

@rolfbjarne

Description

@rolfbjarne

Description

When trying to use R2R on mobile platforms, the ResolveReadyToRunCompilers task fails with:

error NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false.

We have a workaround, so it's not urgent, but this would be nice to get fixed at some point.

Reproduction Steps

csproj:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net11.0</TargetFramework>
    <RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <PublishReadyToRun>true</PublishReadyToRun>
    <PublishReadyToRunComposite>true</PublishReadyToRunComposite>
  </PropertyGroup>
</Project>
$ dotnet publish -bl
Restore complete (0.3s)
    info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
  xyz net11.0 ios-arm64 failed with 1 error(s) (0.2s) → bin/Release/net11.0/ios-arm64/xyz.dll
    macios/builds/downloads/dotnet-sdk-11.0.100-alpha.1.25619.109/sdk/11.0.100-alpha.1.25619.109/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(462,5): error NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false.

Build failed with 1 error(s) in 0.7s

Expected behavior

No error.

Actual behavior

error NETSDK1095: Optimizing assemblies for performance is not supported for the selected target platform or architecture. Please verify you are using a supported runtime identifier, or set the PublishReadyToRun property to false.

Regression?

N/A

Known Workarounds

No response

Configuration

.NET 11.0.100-alpha.1.25619.109

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions