Skip to content

Add net8.0 and net9.0 TFMs to CLI tool package for servicing branch compatibility#1572

Merged
kotlarmilos merged 1 commit intodotnet:mainfrom
kotlarmilos:fix/cli-tool-tfm-compat
Mar 18, 2026
Merged

Add net8.0 and net9.0 TFMs to CLI tool package for servicing branch compatibility#1572
kotlarmilos merged 1 commit intodotnet:mainfrom
kotlarmilos:fix/cli-tool-tfm-compat

Conversation

@kotlarmilos
Copy link
Member

@kotlarmilos kotlarmilos commented Mar 17, 2026

Problem

The Arcade SDK 11.0 defines NetMinimum=net10.0 and NetPrevious='' (empty), so:

  1. The CLI tool NuGet package only contains tools/net10.0/ and tools/net11.0/ TFM folders. When downstream repos on .NET 8 or .NET 9 SDKs try to install the tool via dotnet tool install, it fails with:

    Settings file 'DotnetToolSettings.xml' was not found in the package
    
  2. The library NuGet packages (Microsoft.DotNet.XHarness.Common, TestRunners.*) only target net10.0, causing NuGet restore errors in downstream repos targeting net8.0/net9.0:

    error NU1202: Package Microsoft.DotNet.XHarness.Common 11.0.0-prerelease.26164.3 is not compatible with net9.0
    

Affected downstream PRs:

Root Cause

Arcade SDK TargetFrameworkDefaults.props defines:

  • NetCurrent = net11.0
  • NetPrevious = (empty)
  • NetMinimum = net10.0

Projects using these variables end up with only net11.0;net10.0.

Fix

Add explicit net8.0 (and net9.0 for CLI/AndroidEntryPoint) to TargetFrameworks for all shipped packages. The RollForward=Major in runtimeconfig.json ensures the net8.0 asset can run on any higher .NET runtime.

Affected Packages

Package Before After
Microsoft.DotNet.XHarness.CLI (tool) net11.0, net10.0 net11.0, net10.0, net9.0, net8.0
Microsoft.DotNet.XHarness.Common net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.Apple net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.Android net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.iOS.Shared net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.TestRunners.Common net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.TestRunners.Xunit net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.TestRunners.NUnit net10.0 net10.0, net8.0
Microsoft.DotNet.XHarness.DefaultAndroidEntryPoint.Xunit net11.0, net10.0 net11.0, net10.0, net9.0, net8.0

…ch compatibility

Define XHarnessNetTFMs centrally in Directory.Build.props so all shipped
packages include net8.0 through net11.0. This ensures downstream repos on
older .NET SDKs (e.g. dotnet/runtime release/8.0-staging, release/10.0) can
consume XHarness packages from main.

The Arcade SDK 11.0 defines NetMinimum=net10.0 and NetPrevious='' (empty),
so projects using only Arcade variables end up with just net10.0 and net11.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@kotlarmilos kotlarmilos force-pushed the fix/cli-tool-tfm-compat branch from 26df198 to cb2f998 Compare March 17, 2026 14:04
@kotlarmilos kotlarmilos merged commit 607b3de into dotnet:main Mar 18, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants