Uh oh!
There was an error while loading. Please reload this page.
Enable runtime-async in CoreCLR System.Private.CoreLib - #126594
Conversation
…scv64, loongarch64, and Mono Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/46f839bd-54df-446d-8b31-41b32d813c8c Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Tagging subscribers to this area: @agocke, @dotnet/runtime-infrastructure |
There was a problem hiding this comment.
Pull request overview
Enables the Roslyn runtime-async=on feature flag when building CoreCLR’s System.Private.CoreLib, aligning CoreCLR CoreLib behavior with existing runtime-async enablement elsewhere while excluding known-unsupported architectures and Mono builds.
Changes:
- Add
runtime-async=ontoFeaturesfor CoreCLRSystem.Private.CoreLibbuilds. - Gate the feature behind MSBuild conditions to exclude
riscv64,loongarch64, andRuntimeFlavor=Mono.
VSadov
left a comment
There was a problem hiding this comment.
LGTM. Hopefully no surprises when tests get to run.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Are we still in the window of preview3 so that this can be backported to it? |
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🤖 Copilot Code Review — PR #126594Note This review was generated by GitHub Copilot. Holistic AssessmentMotivation: Justified. Runtime-async ( Approach: The intent is correct but the latest commit (9865b9d, co-authored with Summary: Detailed Findings❌ Configuration Restriction — |
| Location | Configuration restriction? |
|---|---|
NativeAOT SPCL (src/coreclr/nativeaot/.../System.Private.CoreLib.csproj:48-49) | None — all configurations |
Libraries (src/libraries/Directory.Build.targets:140-145) | None — all configurations |
Tests (eng/testing/tests.targets:12-15) | None — all configurations |
| CoreCLR SPCL (this PR) | Release only ❌ |
This appears to be an unintended side effect of applying @am11's suggestion to delete the architecture-conditional PropertyGroup. The deletion removed the </PropertyGroup> that closed the Release group and the <PropertyGroup Condition="..."> that opened the feature group — merging the <Features> line into the Release block.
Fix: Move <Features> into its own unconditional PropertyGroup, or add it to the existing unconditional PropertyGroup that follows:
<PropertyGroupCondition="'$(Configuration)' == 'Release'">
<OptimizeCondition="'$(Optimize)' == ''">true</Optimize>
</PropertyGroup>
<PropertyGroup>
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>⚠️ NativeAOT SPCL Inconsistency — still has riscv64/loongarch64 exclusions
If the riscv64 and loongarch64 runtime-async support is indeed complete (per @am11's review comment citing merged PRs #125446 and #125114), then the same exclusion removal should also be applied to the NativeAOT SPCL at src/coreclr/nativeaot/System.Private.CoreLib/src/System.Private.CoreLib.csproj (lines 45-50), which still has:
<!-- Enable runtime async for Native AOT --><!-- RISC-V: https://github.com/dotnet/runtime/issues/124934 --><!-- LoongArch: https://github.com/dotnet/runtime/issues/124935 -->
<PropertyGroupCondition="'$(TargetArchitecture)' != 'riscv64' and '$(TargetArchitecture)' != 'loongarch64'">
<Features>$(Features);runtime-async=on</Features>
</PropertyGroup>Without updating NativeAOT SPCL, we end up with:
- CoreCLR SPCL: runtime-async on all architectures ✅
- NativeAOT SPCL: runtime-async on all except riscv64/loongarch64 ❌
Note: tracking issues #124934 and #124935 are still open with unchecked items (including NativeAOT support). If the architecture work is not fully complete for NativeAOT, this inconsistency may be intentional — but it should be explicitly noted. Either way, the CoreCLR SPCL change should be made consistently with the NativeAOT SPCL.
⚠️ Stale Approval — VSadov's LGTM was on commit 1
@VSadov approved on the initial commit (c096559) which had Mono and architecture exclusions. The code has changed substantially since then (Mono exclusion removed per @MichalStrehovsky's feedback, architecture exclusions removed per @am11's feedback, and the unintended Release-only restriction). The current code is meaningfully different from what was approved.
💡 PR Description — Stale
The PR description still shows the original PropertyGroup with RuntimeFlavor != 'Mono' and architecture exclusions, and lists "riscv64 excluded" / "loongarch64 excluded" / "Mono flavor excluded" as features. None of these reflect the current state of the code. Consider updating.
Generated by Copilot Code Review workflow for PR #126594
Generated by Code Review for issue #126594 · ◷
agocke
commented
Apr 8, 2026
/ba-g failures are networking |
Uh oh!
There was an error while loading. Please reload this page.
agocke
commented
Apr 9, 2026
/backport to release/11.0-preview3 |
Started backporting to |
All 18 StartupTests methods in IIS.NewShim.FunctionalTests are failing after runtime-async was enabled unconditionally in CoreCLR (dotnet/runtime#126680, dotnet/runtime#126594). The tests return HTTP 500 even though the app starts successfully in-process. Tracking issue: dotnet/runtime#126925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Backflow from https://github.com/dotnet/dotnet / 0cf6b19 build 309569 [[ commit created by automation ]] * Update dependencies from build 309569 Updated Dependencies: Microsoft.NET.Runtime.WebAssembly.Sdk, Microsoft.NETCore.BrowserDebugHost.Transport, Microsoft.NET.Runtime.MonoAOTCompiler.Task, dotnet-ef, Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.TimeProvider, Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.InMemory, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.Sqlite, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.Extensions.Caching.Abstractions, Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.Abstractions, Microsoft.Extensions.Configuration.Binder, Microsoft.Extensions.Configuration.CommandLine, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.FileExtensions, Microsoft.Extensions.Configuration.Ini, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Configuration.UserSecrets, Microsoft.Extensions.Configuration.Xml, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.Diagnostics, Microsoft.Extensions.Diagnostics.Abstractions, Microsoft.Extensions.FileProviders.Abstractions, Microsoft.Extensions.FileProviders.Composite, Microsoft.Extensions.FileProviders.Physical, Microsoft.Extensions.FileSystemGlobbing, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Hosting, Microsoft.Extensions.Hosting.Abstractions, Microsoft.Extensions.Http, Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions, Microsoft.Extensions.Logging.Configuration, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.Debug, Microsoft.Extensions.Logging.EventLog, Microsoft.Extensions.Logging.EventSource, Microsoft.Extensions.Logging.TraceSource, Microsoft.Extensions.Options, Microsoft.Extensions.Options.ConfigurationExtensions, Microsoft.Extensions.Options.DataAnnotations, Microsoft.Extensions.Primitives, Microsoft.Internal.Runtime.AspNetCore.Transport, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Collections.Immutable, System.Composition, System.Configuration.ConfigurationManager, System.Diagnostics.DiagnosticSource, System.Diagnostics.EventLog, System.Diagnostics.PerformanceCounter, System.DirectoryServices.Protocols, System.Formats.Asn1, System.Formats.Cbor, System.IO.Hashing, System.IO.Pipelines, System.Memory.Data, System.Net.Http.Json, System.Net.Http.WinHttpHandler, System.Net.ServerSentEvents, System.Numerics.Tensors, System.Reflection.Metadata, System.Resources.Extensions, System.Runtime.Caching, System.Security.Cryptography.Pkcs, System.Security.Cryptography.Xml, System.Security.Permissions, System.ServiceProcess.ServiceController, System.Text.Encodings.Web, System.Text.Json, System.Threading.AccessControl, System.Threading.Channels, System.Threading.RateLimiting (Version 11.0.0-preview.4.26203.108 -> 11.0.0-preview.4.26208.110) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk (Version 11.0.0-beta.26203.108 -> 11.0.0-beta.26208.110) Microsoft.Web.Xdt (Version 3.3.0-preview.4.26203.108 -> 3.3.0-preview.4.26208.110) NuGet.Frameworks, NuGet.Packaging, NuGet.Versioning (Version 7.6.0-rc.20408 -> 7.6.0-rc.20910) [[ commit created by automation ]] * Add feed back into NuGet.config * Backflow from https://github.com/dotnet/dotnet / 5bed449 build 309901 [[ commit created by automation ]] * Update dependencies from build 309901 Updated Dependencies: Microsoft.NET.Runtime.WebAssembly.Sdk, Microsoft.NETCore.BrowserDebugHost.Transport, Microsoft.NET.Runtime.MonoAOTCompiler.Task, dotnet-ef, Microsoft.Bcl.AsyncInterfaces, Microsoft.Bcl.TimeProvider, Microsoft.EntityFrameworkCore, Microsoft.EntityFrameworkCore.Design, Microsoft.EntityFrameworkCore.InMemory, Microsoft.EntityFrameworkCore.Relational, Microsoft.EntityFrameworkCore.Sqlite, Microsoft.EntityFrameworkCore.SqlServer, Microsoft.EntityFrameworkCore.Tools, Microsoft.Extensions.Caching.Abstractions, Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.Abstractions, Microsoft.Extensions.Configuration.Binder, Microsoft.Extensions.Configuration.CommandLine, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.FileExtensions, Microsoft.Extensions.Configuration.Ini, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.Configuration.UserSecrets, Microsoft.Extensions.Configuration.Xml, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyInjection.Abstractions, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.Diagnostics, Microsoft.Extensions.Diagnostics.Abstractions, Microsoft.Extensions.FileProviders.Abstractions, Microsoft.Extensions.FileProviders.Composite, Microsoft.Extensions.FileProviders.Physical, Microsoft.Extensions.FileSystemGlobbing, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Hosting, Microsoft.Extensions.Hosting.Abstractions, Microsoft.Extensions.Http, Microsoft.Extensions.Logging, Microsoft.Extensions.Logging.Abstractions, Microsoft.Extensions.Logging.Configuration, Microsoft.Extensions.Logging.Console, Microsoft.Extensions.Logging.Debug, Microsoft.Extensions.Logging.EventLog, Microsoft.Extensions.Logging.EventSource, Microsoft.Extensions.Logging.TraceSource, Microsoft.Extensions.Options, Microsoft.Extensions.Options.ConfigurationExtensions, Microsoft.Extensions.Options.DataAnnotations, Microsoft.Extensions.Primitives, Microsoft.Internal.Runtime.AspNetCore.Transport, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Collections.Immutable, System.Composition, System.Configuration.ConfigurationManager, System.Diagnostics.DiagnosticSource, System.Diagnostics.EventLog, System.Diagnostics.PerformanceCounter, System.DirectoryServices.Protocols, System.Formats.Asn1, System.Formats.Cbor, System.IO.Hashing, System.IO.Pipelines, System.Memory.Data, System.Net.Http.Json, System.Net.Http.WinHttpHandler, System.Net.ServerSentEvents, System.Numerics.Tensors, System.Reflection.Metadata, System.Resources.Extensions, System.Runtime.Caching, System.Security.Cryptography.Pkcs, System.Security.Cryptography.Xml, System.Security.Permissions, System.ServiceProcess.ServiceController, System.Text.Encodings.Web, System.Text.Json, System.Threading.AccessControl, System.Threading.Channels, System.Threading.RateLimiting (Version 11.0.0-preview.4.26208.110 -> 11.0.0-preview.4.26210.110) Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk (Version 11.0.0-beta.26208.110 -> 11.0.0-beta.26210.110) Microsoft.Web.Xdt (Version 3.3.0-preview.4.26208.110 -> 3.3.0-preview.4.26210.110) NuGet.Frameworks, NuGet.Packaging, NuGet.Versioning (Version 7.6.0-rc.20910 -> 7.6.0-rc.21110) [[ commit created by automation ]] * Add back package source for dotnet-extensions * Remove DownloadFile task from RepoTasks Removed the DownloadFile task from RepoTasks. * Add quarantined test for AuthHeaderEnvironmentVariableRemoved * Quarantine IIS NewShim StartupTests failing due to runtime-async All 18 StartupTests methods in IIS.NewShim.FunctionalTests are failing after runtime-async was enabled unconditionally in CoreCLR (dotnet/runtime#126680, dotnet/runtime#126594). The tests return HTTP 500 even though the app starts successfully in-process. Tracking issue: dotnet/runtime#126925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Quarantine IIS NewShim StartupTests only (not other IIS variants) Only the NewShim variants of StartupTests are failing after runtime-async was enabled in CoreCLR. Use a partial class to apply [QuarantinedTest] only to the NewShim assembly, leaving the IIS, IISExpress, and NewHandler variants unaffected. Tracking issue: dotnet/runtime#126925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Use #if NEWSHIM_FUNCTIONALS instead of partial class for quarantine Simpler approach: conditionally apply [QuarantinedTest] using the existing NEWSHIM_FUNCTIONALS define constant instead of adding a partial class and a new file. No new files needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Quarantine ShutdownTests.OutOfProcessToInProcessHostingModelSwitchWorks for NewShim This test hangs in the NewShim variant, blocking the entire work item. Same runtime-async root cause as the StartupTests failures. Tracking issue: dotnet/runtime#126925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Quarantine entire ShutdownTests class for NewShim Multiple ShutdownTests methods are failing/hanging in the NewShim variant. Move to class-level quarantine instead of individual method quarantine. Tracking issue: dotnet/runtime#126925 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com> Co-authored-by: Eric StJohn <ericstj@microsoft.com> Co-authored-by: wigodbe <wigodbe@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Description
Runtime-async was enabled for
src/libraries(non-mobile/wasm) but was missing from the CoreCLRSystem.Private.CoreLib. This adds theruntime-async=onfeature flag tosrc/coreclr/System.Private.CoreLib/System.Private.CoreLib.csproj, matching the existing NativeAOT pattern with architecture and runtime flavor exclusions: