[net11.0] Make CoreCLR the default runtime.#25050
[net11.0] Make CoreCLR the default runtime.#25050rolfbjarne wants to merge 12 commits intonet11.0from
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the shared MSBuild props for Apple .NET SDK builds to make CoreCLR the default runtime by changing the default value of UseMonoRuntime.
Changes:
- Set
UseMonoRuntimeto default tofalsewhen unspecified (making CoreCLR the default runtime selection). - Remove previous conditional defaults that set Mono as the default except for macOS / NativeAOT publishing.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [PR Build #1e64a22] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Update CheckAppBundleContents to accept an isCoreCLR parameter so it can correctly filter CoreCLR-specific runtime files on all platforms (not just macOS). This includes: - CoreCLR/Mono dylib filtering based on isCoreCLR instead of platform - Framework-packaged native libraries on iOS/tvOS (libcoreclr.framework, etc.) - R2R compiled app artifacts (.r2r.dylib, BundleStructure.framework) - libxamarin-dotnet-coreclr bridge libraries - Per-rid assembly layout for CoreCLR on MacCatalyst multi-rid builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fix a typo where UseMonoRuntime was always set to 'true' regardless of the useMonoRuntime parameter, so CoreCLR tests were never actually testing CoreCLR. Update assertions for CoreCLR: - Filter out .framework/_CodeSignature entries from the 'no other signed app bundles' check - on iOS/tvOS, CoreCLR packages native runtime libraries as signed .framework bundles. - Exclude dylibs directly in the assembly directory from the 'must be unsigned' check - on macOS/MacCatalyst, CoreCLR native runtime dylibs (libcoreclr.dylib, libSystem.*.dylib, etc.) are signed and should not be part of the customized code signing assertions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When CoreCLR is the default runtime, iOS/tvOS builds enable R2R compilation (CreateR2RFramework=true, CreateR2RDylib=true). The _CreateR2RFramework and _CreateR2RDylib targets invoke native toolchain tasks (CompileAppManifest, LinkNativeCode) that require Xcode/Mac SDK tools. When IsMacEnabled=false (simulating a Windows build environment), the Mac SDK is unavailable and _SdkVersion is empty, causing the CompileAppManifest task to fail with a missing parameter error. Add 'And $(IsMacEnabled) != false' to the conditions of both targets to skip R2R framework/dylib creation when building without Mac tools. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Follow the same pattern as BundleStructureTest: split the public test method into IsNotMacBuild_Mono and IsNotMacBuild_CoreCLR, each calling a private IsNotMacBuild() helper that accepts a useMonoRuntime flag. The UseInterpreter=true test case is only included in the Mono variant since the interpreter is a MonoVM-specific feature. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CoreCLR builds link against additional native runtime libraries: - On iOS/tvOS: @rpath/libcoreclr.framework/libcoreclr and friends, plus the R2R framework (@rpath/MySimpleApp.framework/MySimpleApp) - On macOS/MacCatalyst: @executable_path/.../libcoreclr.dylib and friends, plus the R2R dylib (MySimpleApp.r2r.dylib) CoreCLR None builds are also missing CryptoKit compared to MonoVM, since CoreCLR's BCL doesn't reference it. macOS is CoreCLR-only (no Mono variant), so it's only in _CoreCLR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract shared coreclrFrameworks_iOS/tvOS/MacCatalyst arrays with the CoreCLR runtime library entries. Rename the _Mono base arrays to have no suffix (common to both runtimes), then build the _Mono and _CoreCLR variants using spread expressions: _None_Mono = [.. base_None, CryptoKit] _None_CoreCLR = [.. coreclrFrameworks, .. base_None] _Full_Mono = base_Full (alias) _Full_CoreCLR = [.. coreclrFrameworks, .. base_Full] This removes ~530 lines of duplicated framework lists. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Makes future diffs easier to read when frameworks are added or removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ [CI Build #231e941] Build passed (Build packages) ✅Pipeline on Agent |
✅ [CI Build #231e941] Build passed (Build macOS tests) ✅Pipeline on Agent |
🔥 [CI Build #231e941] Test results 🔥Test results❌ Tests failed on VSTS: test results 3 tests crashed, 8 tests failed, 145 tests passed. Failures❌ dotnettests tests (iOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ dotnettests tests (MacCatalyst)🔥 Failed catastrophically on VSTS: test results - dotnettests_maccatalyst (no summary found). Html Report (VSDrops) Download ❌ dotnettests tests (tvOS)1 tests failed, 0 tests passed.Failed tests
Html Report (VSDrops) Download ❌ framework tests🔥 Failed catastrophically on VSTS: test results - framework (no summary found). Html Report (VSDrops) Download ❌ generator tests🔥 Failed catastrophically on VSTS: test results - generator (no summary found). Html Report (VSDrops) Download ❌ monotouch tests (MacCatalyst)2 tests failed, 17 tests passed.Failed tests
Html Report (VSDrops) Download ❌ monotouch tests (tvOS)1 tests failed, 14 tests passed.Failed tests
Html Report (VSDrops) Download ❌ windows tests1 tests failed, 2 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Sequoia (15) tests1 tests failed, 4 tests passed.Failed tests
Html Report (VSDrops) Download ❌ Tests on macOS Tahoe (26) tests1 tests failed, 4 tests passed.Failed tests
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
No description provided.