Skip to content

runtime-async spec still requires RuntimeFeature.Async, which is not implemented in .NET 11 #138668

In review

Description

@DavidObando

Description

docs/design/specs/runtime-async.md (§I.8.4.5, Sync and Async Methods) currently defines an async-capable assembly in terms of RuntimeFeature.Async:

Async method definitions are only valid inside async-capable assemblies. An async-capable assembly is one which references a corlib containing an abstract sealed class RuntimeFeature with a public const string field member named Async.

However, System.Runtime.CompilerServices.RuntimeFeature in shipped .NET 11 (11.0.0) and current main (src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/RuntimeFeature.cs) does not declare an Async constant, and RuntimeFeature.IsSupported("Async") returns false.

Context

In #114310 ([API Proposal]: Public API for the Runtime Async), RuntimeFeature.Async was discussed and intentionally omitted on the basis that runtime-async capability is gated by the presence of the dedicated System.Runtime.CompilerServices.AsyncHelpers type (which is also what Roslyn checks). When #115181 updated docs/design/specs/runtime-async.md to reflect the approved AsyncHelpers API, the RuntimeFeature.Async bullet in §I.8.4.5 was left unchanged.

Impact

Alternative .NET language compilers and tooling implementing ECMA-335 runtime-async directly from docs/design/specs/runtime-async.md will either fail capability probing against .NET 11.0.0 if they check RuntimeFeature.Async, or have to diverge from the published ECMA-335 draft to probe AsyncHelpers / MethodImplOptions.Async instead.

Suggested Resolution

Either:

  1. Update docs/design/specs/runtime-async.md §I.8.4.5 (and any future ECMA-335 augments merge) to define an async-capable assembly using the actual .NET 11 capability contract (e.g., referencing a corlib declaring System.Runtime.CompilerServices.AsyncHelpers and/or MethodImplOptions.Async), matching the decision in [API Proposal]: Public API for the Runtime Async #114310; or
  2. Implement RuntimeFeature.Async (and handle it in RuntimeFeature.IsSupported) if ECMA-335 is still intended to standardize RuntimeFeature.Async.

Activity

  1. added
    untriaged
    on Dec 3, 2026
  2. dotnet-policy-service commented on Dec 3, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @dotnet/area-system-runtime-compilerservices
    See info in area-owners.md if you want to be subscribed.

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

Metadata

Metadata

Assignees

Labels

area-System.Runtime.CompilerServicesruntime-asyncuntriaged

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions