Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/libraries/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,8 @@
<CoverageIncludeDirectory Include="shared\Microsoft.NETCore.App\$(ProductVersion)" />
</ItemGroup>

<PropertyGroup>
<Features Condition="'$(RuntimeFlavor)' != 'mono' and '$(TestBuildMode)' != 'nativeaot' and '$(TargetArchitecture)' != 'wasm'">$(Features);runtime-async=on</Features>
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

The condition for enabling runtime-async differs from the one in eng/testing/tests.targets in several ways:

  1. This uses TargetArchitecture != 'wasm' while tests.targets uses TargetOS != 'browser' and TargetOS != 'wasi'. Note that WASM projects set TargetArchitecture='wasm' but have TargetOS='browser' or 'wasi', so these conditions are not equivalent.

  2. This doesn't check for TestReadyToRun, while tests.targets excludes it explicitly.

  3. This doesn't check for TargetsAppleMobile, while tests.targets excludes it.

  4. This doesn't allow opting out via UseRuntimeAsync='false', while tests.targets does.

  5. This uses TestBuildMode != 'nativeaot' while tests.targets uses multiple NativeAOT-related properties (TestNativeAot, UseNativeAOTRuntime).

Consider aligning these conditions for consistency, or document why the libraries partition needs different criteria. The TargetArchitecture != 'wasm' check in particular may not correctly handle browser/wasi scenarios since those have TargetOS='browser'/'wasi' but TargetArchitecture='wasm'.

Suggested change
<Features Condition="'$(RuntimeFlavor)' != 'mono' and '$(TestBuildMode)' != 'nativeaot' and '$(TargetArchitecture)' != 'wasm'">$(Features);runtime-async=on</Features>
<Features Condition="'$(RuntimeFlavor)' != 'mono' and '$(TargetOS)' != 'browser' and '$(TargetOS)' != 'wasi' and '$(TestReadyToRun)' != 'true' and '$(TargetsAppleMobile)' != 'true' and '$(UseRuntimeAsync)' != 'false' and '$(TestNativeAot)' != 'true' and '$(UseNativeAOTRuntime)' != 'true'">$(Features);runtime-async=on</Features>

Copilot uses AI. Check for mistakes.
<NoWarn>$(NoWarn);SYSLIB5007</NoWarn>
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

SYSLIB5007 is not documented in docs/project/list-of-diagnostics.md and no API with this diagnostic ID exists in the codebase. If this is a new experimental diagnostic for runtime-async APIs, it should be added to the list of experimental diagnostics (SYSLIB5001-SYSLIB5999) in that documentation file before suppressing it globally. If this diagnostic ID is expected to be introduced by the compiler or an analyzer in the future, consider adding a comment explaining what this warning is for, or wait to suppress it until the warning actually exists.

Suggested change
<NoWarn>$(NoWarn);SYSLIB5007</NoWarn>

Copilot uses AI. Check for mistakes.
</PropertyGroup>
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

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

Trailing whitespace detected after the closing tag. According to .editorconfig, all files should have trim_trailing_whitespace = true. Please remove the trailing spaces at the end of this line.

Suggested change
</PropertyGroup>
</PropertyGroup>

Copilot uses AI. Check for mistakes.
</Project>
Loading