Skip to content

Enable runtime async for all .NET 12 platforms - #138347

Closed
MichalStrehovsky wants to merge 2 commits into
dotnet:mainfrom
MichalStrehovsky:enable-runtime-async-net12-platforms
Closed

MichalStrehovsky wants to merge 2 commits into
dotnet:mainfrom
MichalStrehovsky:enable-runtime-async-net12-platforms

Conversation

@MichalStrehovsky

Copy link
Copy Markdown
Member

Shaves off 50 kB from a dotnet new blazorwasm template with native AOT. We'll be able to shave off more when aspnetcore makes the switch too.

MichalStrehovsky and others added 2 commits November 26, 2026 16:54
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0569df38-69c0-490d-a237-112f811bccd7
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 0569df38-69c0-490d-a237-112f811bccd7
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

Comment thread eng/testing/tests.targets
<!-- Runtime async is supported on all platforms starting with .NET 12. -->
<PropertyGroup Condition="'$(RuntimeAsyncSupported)' == ''">
<RuntimeAsyncSupported Condition="'$(TargetOS)' != 'browser'
<RuntimeAsyncSupported Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net12.0'))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can this be simplified to just <RuntimeAsyncSupported Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net12.0'))">?

TargetOS does not track package-specific OS if there is any. It tracks the runtime OS that is always for the current .NET version.

<!-- Runtime async is supported on all platforms starting with .NET 12. -->
<PropertyGroup Condition="'$(RuntimeAsyncSupported)' == ''">
<RuntimeAsyncSupported Condition="'$(TargetOS)' != 'browser'
<RuntimeAsyncSupported Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net12.0'))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here - I think this can be simplified to just <RuntimeAsyncSupported>true</RuntimeAsyncSupported>

@jkotas

jkotas commented Nov 26, 2026

Copy link
Copy Markdown
Member

#138349 has the correct shape

@jkotas jkotas closed this Nov 26, 2026
@MichalStrehovsky
MichalStrehovsky deleted the enable-runtime-async-net12-platforms branch November 26, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants