Skip to content

[net11] PublishReadyToRunComposite=false fails to build on iOS with MSB3030 for every assembly #26456

Description

@MartinZikmund

Apple platform

iOS

Framework version

net11.0

Affected platform version

.NET SDK 11.0.100-preview.7.26381.103, Microsoft.iOS.Sdk.net11.0_26.5/26.5.11997-net11-p7, Xcode 26.5

Description

Setting PublishReadyToRunComposite=false — to get per-assembly ReadyToRun instead of a single composite image — makes the build fail. The R2R output-path fixup expects per-assembly .dylib files, but non-composite crossgen2 output is not produced at those paths, so the copy step fails for every assembly.

The build ends with 93 errors, the first being:

error MSB3030: Could not copy the file "obj/Release/net11.0-ios/iossimulator-x64/R2R/Microsoft.iOS.dylib" because it was not found.

raised from Microsoft.NET.Publish.targets via the iOS R2R path fixup (_FixR2ROutputPaths).

The same project builds cleanly with the default (PublishReadyToRunComposite unset, i.e. composite on), so this is specific to the non-composite path.

Context for why we tried it: composite R2R is producing a very large image for our app (see #26455), and per-assembly R2R was the natural thing to evaluate as an alternative. It appears the non-composite path is not currently wired up for iOS.

If per-assembly R2R is intentionally unsupported on iOS, it would help a lot if the property produced a clear diagnostic ("PublishReadyToRunComposite=false is not supported on iOS") rather than 93 file-not-found copy errors.

Steps to Reproduce

  1. Take any iOS app targeting net11.0.
  2. Build for the simulator in Release with composite explicitly disabled:
dotnet build -f net11.0-ios -c Release -p:PublishReadyToRunComposite=false
  1. Build fails with MSB3030: Could not copy the file "obj/Release/net11.0-ios/<rid>/R2R/<Assembly>.dylib" because it was not found., repeated once per assembly.

Reproduced on the Uno Platform samples app (~276 assemblies); the same project builds successfully in 2:55 with the property removed. Happy to produce a minimal standalone repro if that would help.

Did you find any workaround?

No workaround for getting per-assembly R2R on iOS. We stayed on composite R2R and addressed our size problem a different way (stripping the symbol table from the composite framework).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions