Enable runtime-async for SharedFx-only libraries#66200
Conversation
There was a problem hiding this comment.
Pull request overview
Enables the runtime-async feature for .NET 11+ projects that ship only in the shared framework, and extends the same enablement to compatible test projects while attempting to avoid WebAssembly where it’s incompatible.
Changes:
- Turn on
runtime-asyncforIsAspNetCoreApp=trueprojects that are not packable and targetnet11.0+. - Turn on
runtime-asyncforIsTestProject/IsTestAssetProjecttargetingnet11.0+. - Add a
TargetOS != browsercondition intended to avoid wasm scenarios.
Agent-Logs-Url: https://github.com/dotnet/aspnetcore/sessions/41a0b51b-1b8a-49be-99b9-41c10b7cb732 Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
| <Features>$(Features);runtime-async=on</Features> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Also enable runtime async for compatible test projects --> |
There was a problem hiding this comment.
I assume that the tests would fail if not for this, right? Otherwise, I'd probably want to run in both modes at least temporarily.
There was a problem hiding this comment.
I think they would, but I'm largely cribbing off of what runtime did: dotnet/runtime#125406
…godbe/runtime-async
|
There's now a consistent failure in
Looking |
@halter73 @BrennanConroy think we should skip this one for now? |
Cribbing off of dotnet/runtime#125406. Enable runtime-async for net11.0+ projects that ship only in the Shared Framework. We can't enable it for projects that ship both in the SharedFx & as packages, because runtime-async is incompatible w/ wasm, so anyone who tried to use such a package in a wasm project would be broken.
Also enables runtime-async for tests.
The wasm exclusion checks both
$(TargetOS) != browserand!$(RuntimeIdentifier.StartsWith('browser-'))to correctly exclude projects that target WebAssembly viaRuntimeIdentifier=browser-wasmeven when$(TargetOS)is empty.Description
Enables the
runtime-asynccompiler feature fornet11.0+projects that ship only in the ASP.NET Core Shared Framework (IsAspNetCoreApp=true,IsPackable!=true) and for compatible test/test-asset projects. Projects that are also shipped as NuGet packages are excluded because runtime-async is incompatible with WebAssembly, which would break wasm consumers.Wasm exclusion is enforced by checking both
$(TargetOS) != browserand!$(RuntimeIdentifier.StartsWith('browser-'))to cover the case where$(TargetOS)is empty but the project targets wasm viaRuntimeIdentifier=browser-wasm.