Skip to content

[release/11.0.1xx-preview3] Make CoreCLR the default runtime for debug builds.#25051

Draft
rolfbjarne wants to merge 2 commits intorelease/11.0.1xx-preview3from
dev/rolf/release/11.0.1xx-preview3
Draft

[release/11.0.1xx-preview3] Make CoreCLR the default runtime for debug builds.#25051
rolfbjarne wants to merge 2 commits intorelease/11.0.1xx-preview3from
dev/rolf/release/11.0.1xx-preview3

Conversation

@rolfbjarne
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the SDK defaults to make CoreCLR the default runtime for debug builds (instead of Mono), aligning debug behavior with the intended runtime selection.

Changes:

  • Adds a new defaulting rule for UseMonoRuntime intended to switch debug builds to CoreCLR.
  • Keeps existing defaulting rules for macOS and NativeAOT unchanged.

-->
<_UseNativeAot Condition="'$(PublishAot)' == 'true' And '$(_IsPublishing)' == 'true'">true</_UseNativeAot>

<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_BundlerDebug)' == 'true'">false</UseMonoRuntime>
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new default UseMonoRuntime condition depends on $(_BundlerDebug), but _BundlerDebug is only computed later in dotnet/targets/Xamarin.Shared.Sdk.targets (before importing Microsoft.NET.Sdk). Since this file is a .props imported earlier, $(_BundlerDebug) will typically still be empty here, so this condition won’t fire and debug builds will continue to default to Mono. Consider basing the default on $(Configuration) == 'Debug' (and/or $(MtouchDebug)/$(MmpDebug) if those are set early), or move the UseMonoRuntime defaulting logic to a location where _BundlerDebug is already defined (and ensure dependent property groups still evaluate as intended).

Suggested change
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_BundlerDebug)' == 'true'">false</UseMonoRuntime>
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(Configuration)' == 'Debug'">false</UseMonoRuntime>

Copilot uses AI. Check for mistakes.
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #4db2099] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 4db2099e9f86576bca72ca495ce7f75af53c01bf [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [PR Build #4db2099] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 4db2099e9f86576bca72ca495ce7f75af53c01bf [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 4db2099e9f86576bca72ca495ce7f75af53c01bf [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

✅ [CI Build #4db2099] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 4db2099e9f86576bca72ca495ce7f75af53c01bf [PR build]

@vs-mobiletools-engineering-service2
Copy link
Copy Markdown
Collaborator

🔥 [CI Build #4db2099] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 11 tests failed, 150 tests passed.

Failures

❌ dotnettests tests (iOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.BundleStructureTest.Build(iOS,"ios-arm64",All,"Deb...: No unexpected files
      Expected:
      But was: < "Frameworks/BundleStructure.framework", "Frameworks/BundleStructure.fram...
    • Xamarin.Tests.BundleStructureTest.Build(iOS,"iossimulator-x64",A...: No unexpected files
      Expected:
      But was: < "Frameworks/BundleStructure.framework", "Frameworks/BundleStructure.fram...
    • Xamarin.Tests.DotNetProjectTest.BuildProjectsWithExtensions(iOS,...: 'dotnet build' failed with exit code 1
      Full command: /Users/builder/azdo/_work/3/s/macios/builds/downloads/dotnet-sdk-11.0.100-p...
    • ... and 19 more

Html Report (VSDrops) Download

❌ dotnettests tests (MacCatalyst)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.BundleStructureTest.Build(MacCatalyst,"maccatalyst...: No unexpected files
      Expected:
      But was: < "Contents/MonoBundle/.xamarin/maccatalyst-arm64/FrameworksInRuntimesNati...
    • Xamarin.Tests.BundleStructureTest.Build(MacCatalyst,"maccatalyst...: No unexpected files
      Expected:
      But was: < "Contents/MonoBundle/BundleStructure.r2r.dylib", "Contents/MonoBundle/li...
    • Xamarin.Tests.DotNetProjectTest.CustomizedCodeSigning(MacCatalys...: Unsigned: /Users/builder/azdo/_work/1/s/macios/tests/dotnet/CustomizedCodeSigning/MacCatalyst/bin/Debug/net11.0-maccatalyst/ma...
    • ... and 7 more

Html Report (VSDrops) Download

❌ dotnettests tests (tvOS)

1 tests failed, 0 tests passed.

Failed tests

  • DotNet tests: Failed (Execution failed with exit code 1)
    • Xamarin.Tests.BundleStructureTest.Build(TVOS,"tvos-arm64",All,"D...: No unexpected files
      Expected:
      But was: < "Frameworks/BundleStructure.framework", "Frameworks/BundleStructure.fram...

    • Xamarin.Tests.DotNetProjectTest.DedupEnabledTest(TVOS,"tvos-arm6...: Dedup optimization should be enabled for AOT compilation on: TVOS with RID: tvos-arm64
      Expected: True
      But was: False

    • Xamarin.Tests.DotNetProjectTest.DedupEnabledTest(TVOS,"tvos-arm6...: Dedup optimization should be enabled for AOT compilation on: TVOS with RID: tvos-arm64
      Expected: True
      But was: False

    • ... and 4 more

Html Report (VSDrops) Download

❌ linker tests

1 tests failed, 43 tests passed.

Failed tests

  • link all/iOS - simulator/Release: HarnessException (Harness exception for 'link all': System.AggregateException: One or more errors occurred. (A task was canceled.)
    ---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
    at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.get_TestExecutionStarted() at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult() at Xharness.AppRunner.RunAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 424 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext(Thread threadPoolThread) at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.ExecuteCommandAsync(String filename, IList1 args, ILog log, ILog stdout, ILog stderr, TimeSpan timeout, Dictionary2 environmentVariables, Nullable1 cancellationToken)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext()
    at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
    at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.SetExistingTaskResult(Task1 task, TResult result)
    at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.RunAsyncInternal(Process process, ILog log, ILog stdout, ILog stderr, Action2 kill, Func3 getChildProcessIds, Nullable1 timeout, Dictionary2 environmentVariables, Nullable1 cancellationToken, Nullable1 diagnostics)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext()
    at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
    at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
    at Microsoft.DotNet.XHarness.Common.Execution.ProcessManager.WaitForExitAsync(Process process, Nullable1 timeout) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext() at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining) at System.Threading.Tasks.Task.RunContinuations(Object continuationObject) at Microsoft.DotNet.XHarness.Common.Utilities.Extensions.TimeoutAfter[T](Task1 task, TimeSpan timeout)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.AsyncStateMachineBox1.MoveNext()
    at System.Threading.Tasks.AwaitTaskContinuation.RunOrScheduleAction(IAsyncStateMachineBox box, Boolean allowInlining)
    at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
    at System.Threading.Tasks.Task.TwoTaskWhenAnyPromise`1.Invoke(Task completingTask)
    at System.Threading.Tasks.Task.RunContinuations(Object continuationObject)
    at System.Diagnostics.Process.OnExited()
    at System.Threading._ThreadPoolWaitOrTimerCallback.WaitOrTimerCallback_Context_f(Object state)
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    at System.Threading.CompleteWaitThreadPoolWorkItem.System.Threading.IThreadPoolWorkItem.Execute()
    at System.Threading.ThreadPoolWorkQueue.Dispatch()
    at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
    at System.Threading.Thread.StartCallback()
    --- End of stack trace from previous location ---

    --- End of inner exception stack trace ---
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
    at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.get_TestExecutionStarted()
    at Microsoft.DotNet.XHarness.iOS.Shared.TestReporter.ParseResult()
    at Xharness.AppRunner.RunAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/AppRunner.cs:line 424
    at Xharness.Jenkins.TestTasks.RunSimulator.RunTestAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunSimulator.cs:line 123
    at Xharness.Jenkins.TestTasks.RunTest.ExecuteAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/RunTest.cs:line 113
    at Xharness.Jenkins.TestTasks.TestTasks.RunInternalAsync() in /Users/builder/azdo/_work/1/s/macios/tests/xharness/Jenkins/TestTasks/TestTask.cs:line 234)

Html Report (VSDrops) Download

❌ monotouch tests (iOS)

2 tests failed, 13 tests passed.

Failed tests

  • monotouch-test/iOS - simulator/Release (all optimizations): Crashed
  • monotouch-test/iOS - simulator/Release (managed static registrar, all optimizations): TimedOut

Html Report (VSDrops) Download

❌ monotouch tests (MacCatalyst)

2 tests failed, 17 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst/Release (NativeAOT): Failed (Test run failed.
    Tests run: 3729 Passed: 3560 Inconclusive: 10 Failed: 1 Ignored: 168)
  • monotouch-test/Mac Catalyst/Release (static registrar): Failed (Test run failed.
    Tests run: 3729 Passed: 3569 Inconclusive: 10 Failed: 2 Ignored: 158)

Html Report (VSDrops) Download

❌ windows tests

1 tests failed, 2 tests passed.

Failed tests

  • Remote .NET tests/Xamarin.Tests.WindowsTest.PluralRuntimeIdentifiersWithRemoteMac(iOS,"ios-arm64"): Failed: 'dotnet build' failed with exit code 1

  • Remote .NET tests/Xamarin.Tests.WindowsTest.BundleStructureWithRemoteMac(iOS,"ios-arm64",All,"Debug"): Failed: No unexpected files

  • Remote .NET tests/Xamarin.Tests.IncrementalBuildTest.CodeChangeSkipsTargetsOnRemoteWindows(iOS,"iossimulator-arm64",False): Failed: The target '_LinkNativeExecutable' was not executed: the target was found 1 time(s) in the binlog, but they were all skipped (B)

Html Report (VSDrops) Download

❌ Tests on macOS Sequoia (15) tests

1 tests failed, 4 tests passed.

Failed tests

  • monotouch-test: Failed

Html Report (VSDrops) Download

❌ Tests on macOS Tahoe (26) tests

1 tests failed, 4 tests passed.

Failed tests

  • monotouch-test: Failed
    • SslCertificatesWithoutOCSPEndPointsNSUrlSessionHandler_AllowByDefault("https://sha256.badssl.com/") : Validation Callback called
    • SslCertificatesWithoutOCSPEndPointsNSUrlSessionHandler_AllowByDefault("https://sha256.badssl.com/") : Validation Callback called

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 9 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 12 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 4db2099e9f86576bca72ca495ce7f75af53c01bf [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants