You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[net11] PublishReadyToRunComposite=false fails to build on iOS with MSB3030 for every assembly #26456
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
Take any iOS app targeting net11.0.
Build for the simulator in Release with composite explicitly disabled:
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).
Thanks for the detailed report — I was able to reproduce this exactly (8 MSB3030 errors on a small test app instead of your 93).
What's going on
Non-composite ReadyToRun isn't wired up for iOS/tvOS/Mac Catalyst, and it can't be with the current runtime support. There are two layers to the failure:
Our _FixR2ROutputPaths workaround rewrites OutputR2RImage to R2R/<Assembly>%(Extension), but for the non-composite compile list the item spec is the IL assembly, so crossgen2 was told to write R2R/<Assembly>.dll instead of the R2R/<Assembly>.o the SDK expects. The .dylib the publish step then wants to copy never exists — hence one MSB3030 per assembly.
Fixing that isn't enough. With the Mach-O container format we use on these platforms, crossgen2 in non-composite mode emits one .o per assembly but no component IL assemblies, while the SDK replaces the IL assemblies in the publish output with the (per-assembly) dylibs — so the app would end up with no managed assemblies at all. And the runtime only knows how to find platform-native ReadyToRun code by looking up the owner composite image; see readytorun-platform-native-envelope.md, which states that Mach-O support is composite-only.
So per-assembly R2R is genuinely unsupported here, not just unwired.
What I changed
Exactly what you asked for in the last paragraph of your report: a single, actionable error reported before crossgen2 even runs, instead of 93 file-not-found copy errors:
error : Setting 'PublishReadyToRunComposite' to 'false' isn't supported for iOS projects,
only composite ReadyToRun compilation is supported. Either remove the
'PublishReadyToRunComposite' property, or set 'PublishReadyToRun=false' to turn off
ReadyToRun compilation completely.
I've also documented the property in docs/building-apps/build-properties.md and added a regression test. No standalone repro needed — thanks for offering though.
Your composite size problem is tracked separately in #26455; per-assembly R2R unfortunately isn't an option to work around it right now.
Activity
rolfbjarne commentedon Aug 27, 2026
Thanks for the detailed report — I was able to reproduce this exactly (8
MSB3030errors on a small test app instead of your 93).What's going on
Non-composite ReadyToRun isn't wired up for iOS/tvOS/Mac Catalyst, and it can't be with the current runtime support. There are two layers to the failure:
Our
_FixR2ROutputPathsworkaround rewritesOutputR2RImagetoR2R/<Assembly>%(Extension), but for the non-composite compile list the item spec is the IL assembly, so crossgen2 was told to writeR2R/<Assembly>.dllinstead of theR2R/<Assembly>.othe SDK expects. The.dylibthe publish step then wants to copy never exists — hence oneMSB3030per assembly.Fixing that isn't enough. With the Mach-O container format we use on these platforms, crossgen2 in non-composite mode emits one
.oper assembly but no component IL assemblies, while the SDK replaces the IL assemblies in the publish output with the (per-assembly) dylibs — so the app would end up with no managed assemblies at all. And the runtime only knows how to find platform-native ReadyToRun code by looking up the owner composite image; see readytorun-platform-native-envelope.md, which states that Mach-O support is composite-only.So per-assembly R2R is genuinely unsupported here, not just unwired.
What I changed
Exactly what you asked for in the last paragraph of your report: a single, actionable error reported before crossgen2 even runs, instead of 93 file-not-found copy errors:
I've also documented the property in
docs/building-apps/build-properties.mdand added a regression test. No standalone repro needed — thanks for offering though.Your composite size problem is tracked separately in #26455; per-assembly R2R unfortunately isn't an option to work around it right now.
[dotnet] Report a clear error for PublishReadyToRunComposite=false. F…