Skip to content

Bump Arcade framework defaults to net12.0 - #17621

Closed
wtgodbe wants to merge 5 commits into
mainfrom
wtgodbe/arcade-net12
Closed

wtgodbe wants to merge 5 commits into
mainfrom
wtgodbe/arcade-net12

Conversation

@wtgodbe

@wtgodbe wtgodbe commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Start the Arcade .NET 12 framework-default transition. The paired VMR draft is dotnet/dotnet#9722; coordinate the final transition and downstream fixes through the VMR.

  • Set NetCurrent to net12.0, NetPrevious to net11.0, and retain NetMinimum at net10.0.
  • Preserve the existing source-only behavior that aligns the previous/minimum frameworks with NetCurrent.
  • Temporarily import the in-tree framework defaults because the bootstrap Arcade SDK still declares NetCurrent=net11.0.
  • Keep the .NET SDK pinned to 11.0.100-rc.1.26420.103.
  • Move the shared Helix xUnit publish default to net12.0, while explicitly publishing Arcade's own tests for their existing bundled-SDK framework.
  • Retain explicit net11.0 package validation alongside the new current framework.
  • Document the framework-property semantics without hardcoded version examples.

Bootstrap compatibility

Merged Arcade main at 2e48b7dec08004636dc4dd0c58ca40711d5d5834, including dotnet/arcade#17627 and its self-dependency update dotnet/arcade#17633.

The consumed Microsoft.DotNet.Arcade.Sdk package is now 12.0.0-beta.26479.1. It supplies the bundled-framework targeting-pack baseline, maximum-supported-framework adjustment, and nearest-framework pruning fallback. The equivalent temporary overrides have been removed from this PR's Directory.Build.props; no new pack-mapping implementation or .NET SDK upgrade is needed.

This refresh updates only the standalone Arcade PR. The VMR PR has not been refreshed and still retains its older-bootstrap compatibility settings; the two PRs are not currently byte-for-byte identical.

Validation

  • Built and packed Microsoft.DotNet.XUnitConsoleRunner for net12.0, net11.0, and net10.0 using the unchanged .NET 11 SDK and updated bootstrap Arcade package, without compatibility overrides on the command line.
  • Verified the resulting package contains all three runner layouts and matching runtime-config TFMs.
  • Evaluated normal builds for all three TFMs and source-only properties for net12.0: confirmed the net11.0 baseline, maximum version 12.0, pruning fallback, and synthesized net12.0 framework/host entries using the bootstrap SDK's packs.
  • Confirmed Arcade's Helix publish framework matches its net11.0 test framework, then restored and published Microsoft.Arcade.Common.Tests through Helix's PublishWithOutput target.
  • git diff --check passed.

Full CI and Linux source-only execution remain for CI; local source-only validation above covers property and pack-metadata evaluation, not a complete source-build.

Historical framework-transition precedents: dotnet/arcade#16443, dotnet/arcade#15221, and dotnet/dotnet#4130.

Set NetPrevious to net11.0 and retain NetMinimum at net10.0. Align the bootstrap defaults, SDK pin, package validation and Helix publish target for the initial Arcade-only transition.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The pinned SDK cannot restore projects targeting net12.0, blocking repository builds.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Starts Arcade’s .NET 12 transition by updating framework defaults, SDK pinning, Helix publishing, package validation, and documentation.

Changes:

  • Sets current and previous frameworks to net12.0 and net11.0.
  • Pins the .NET SDK and imports in-tree framework defaults during bootstrapping.
  • Updates Helix publishing and package-validation targets.
File Summary
src/​Microsoft.DotNet.Helix/​Sdk/​tools/​xunit-runner/​XUnitRunner.targets Defaults Helix publishing to .NET 12.
src/​Microsoft.DotNet.Build.Tasks.Packaging/​src/​build/​Packaging.targets Adds explicit .NET 11 package validation.
src/​Microsoft.DotNet.Arcade.Sdk/​tools/​TargetFrameworkDefaults.props Updates framework defaults.
global.json Pins the SDK; the selected SDK lacks .NET 12 targeting support, causing restore failures. Critical (4 votes).
Documentation/​ArcadeSdk.md Documents updated framework behavior; one clarification nit remains. Nit (1 vote).
Directory.Build.props Imports in-tree framework defaults during bootstrapping.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread global.json Outdated
{
"sdk": {
"version": "11.0.100-rc.1.26420.103",
"version": "12.0.100-alpha.1.26473.114",
Restore the original SDK pin and reuse Arcade's existing targeting-pack mapping. Raise the temporary targeting limit, retain a downlevel source-only baseline, and use the SDK's nearest-framework pruning data.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings September 24, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Scope pruning fallback to net12.0; the current global setting can alter dependency graphs for other target frameworks.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)

Comment thread Directory.Build.props Resolved
@wtgodbe

wtgodbe commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

Going to wait until a rebootstrap PR w/ net12.0 is available (should be next week)

@ViktorHofer ViktorHofer left a comment •

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.

Avoid hardcoded values in ArcadeSdk.md so that we don't need to rev it constantly. I think this change should be done in the VMR otherwise the arcade -> vmr codeflow will be blocked for quite some time. I expect a ton of reactions will be necessary.

Going to wait until a rebootstrap PR w/ net12.0 is available (should be next week)

Why? The Arcade SDK already automatically enables targeting a newer TFM when using these TFM properties.

@wtgodbe

wtgodbe commented Sep 25, 2026

Copy link
Copy Markdown
Member Author

@ViktorHofer

I think this change should be done in the VMR otherwise the arcade -> vmr codeflow will be blocked for quite some time.

I've got draft PRs in both places, to make sure all Arcade tests pass + the VMR works: dotnet/dotnet#9722. Once this PR is working, I'm planning on doing the rest of the work in the VMR PR.

Why? The Arcade SDK already automatically enables targeting a newer TFM when using these TFM properties.

One issue is that Arcade doesn’t override NETCoreAppMaximumVersion, so the current net11.0 SDK still rejects net12.0 with NETSDK1045 - do you remember how we got around that last time? I don't see that prop getting set in dotnet/dotnet#4130.

Also, because this is an LTS version, NetCurrent, NetPrevious, and NetMinimum all get set to net12.0 for SourceBuild:

<NetCurrent>net12.0</NetCurrent>
<!-- The previously released version of .NET.
Undefined when NetMinimum and NetPrevious are identical, otherwise identical with
NetCurrent when building from source. -->
<NetPrevious>net11.0</NetPrevious>
<NetPrevious Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(NetPrevious)' != ''">$(NetCurrent)</NetPrevious>
<!-- Lowest supported version of .NET at the time of the release of NetCurrent.
Identical with NetCurrent when building from source. -->
<NetMinimum>net10.0</NetMinimum>
<NetMinimum Condition="'$(DotNetBuildSourceOnly)' == 'true'">$(NetCurrent)</NetMinimum>
. So the targeting pack bootstrap goop tries to copy the net12.0 FrameworkReferences instead of copying the net11.0 ones in SourceBuild:
<PropertyGroup>
<!-- These switches control whether known pack items and version updates are enabled for unknown target frameworks. On by default. -->
<EnableKnownPackItemsForUnknownTargetFramework Condition="'$(EnableKnownPackItemsForUnknownTargetFramework)' == ''">true</EnableKnownPackItemsForUnknownTargetFramework>
<EnableKnownPackVersionUpdatesForCurrentTargetFramework Condition="'$(EnableKnownPackVersionUpdatesForCurrentTargetFramework)' == ''">true</EnableKnownPackVersionUpdatesForCurrentTargetFramework>
<TargetingPackCurrentTargetFramework Condition="'$(TargetingPackCurrentTargetFramework)' == ''">$(NetCurrent)</TargetingPackCurrentTargetFramework>
<TargetingPackBaselineTargetFramework Condition="'$(TargetingPackBaselineTargetFramework)' == ''">$(NetPrevious)</TargetingPackBaselineTargetFramework>
<TargetingPackBaselineTargetFramework Condition="'$(TargetingPackBaselineTargetFramework)' == ''">$(NetMinimum)</TargetingPackBaselineTargetFramework>
</PropertyGroup>
<!-- Add Known* items if the SDK doesn't support the TargetFramework yet. Uses the metadata from the `TargetingPackBaselineTargetFramework`, which includes versions. -->
<ItemGroup Condition="'$(EnableKnownPackItemsForUnknownTargetFramework)' == 'true'">
<KnownFrameworkReference
Include="@(KnownFrameworkReference->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownFrameworkReference->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownRuntimePack
Include="@(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)')->WithMetadataValue('RuntimePackLabels', 'Mono'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('RuntimePackLabels', 'Mono')->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownRuntimePack
Include="@(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)')->WithMetadataValue('RuntimePackLabels', 'NativeAOT'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownRuntimePack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('RuntimePackLabels', 'NativeAOT')->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownILCompilerPack
Include="@(KnownILCompilerPack->WithMetadataValue('Identity', 'Microsoft.DotNet.ILCompiler')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownILCompilerPack->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownCrossgen2Pack
Include="@(KnownCrossgen2Pack->WithMetadataValue('Identity', 'Microsoft.NETCore.App.Crossgen2')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownCrossgen2Pack->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownAppHostPack
Include="@(KnownAppHostPack->WithMetadataValue('Identity', 'Microsoft.NETCore.App')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownAppHostPack->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />
<KnownILLinkPack
Include="@(KnownILLinkPack->WithMetadataValue('Identity', 'Microsoft.NET.ILLink.Tasks')->WithMetadataValue('TargetFramework', '$(TargetingPackBaselineTargetFramework)'))"
TargetFramework="$(TargetingPackCurrentTargetFramework)"
Condition="'@(KnownILLinkPack->AnyHaveMetadataValue('TargetFramework', '$(TargetingPackCurrentTargetFramework)'))' != 'true'" />

I could keep iterating to get things working, but I figured it'd be easier to just wait for a bootstrap SDK

@ViktorHofer

ViktorHofer commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

NetCurrent, NetPrevious, and NetMinimum all get set to net12.0 for SourceBuild:

Ah right, good find. That is unrelated to LTS vs STS. Sourcebuild now sets those floating TFM properties to latest always. I just didn't think about that back when I added the TargetingPacks.BeforeCommonTargets.targets file. So probably just needs another condition for source-build.

I think this can be simplified further given that the SDK exposes the BundledNETCoreAppTargetFramework property since .NET 11: https://github.com/dotnet/sdk/blob/3b1d59fe28a146e203859d99925810e77cbffb9c/src/Layout/redist/targets/GenerateBundledVersions.targets#L716.

With that, we don't need to customize anything for source-build. So TargetingPackBaselineTargetFramework should just default to BundledNETCoreAppTargetFramework instead of NetPrevious and NetMinimum.

@ViktorHofer

ViktorHofer commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

One issue is that Arcade doesn’t override NETCoreAppMaximumVersion

Another good find. Yes, we should set that in TargetingPacks.BeforeCommonTargets.targets as well (when necessary, I wouldn't set it unconditionally).

@ViktorHofer

Copy link
Copy Markdown
Member

@wtgodbe I took a stab at it as I was interested: #17627

@ViktorHofer

Copy link
Copy Markdown
Member

@wtgodbe the arcade changes are now in so you should be able to proceed. As mentioned before, you shouldn't need to update the .NET SDK.

Will Godbe and others added 3 commits September 29, 2026 10:11
Keep the in-tree framework defaults import until the bootstrap package carries the net12.0 defaults. Document framework aliases without hardcoded versions.

Co-authored-by: Copilot <[email protected]>
Keep Arcade's bundled-framework tests on their actual target when the shared xUnit publish default advances to net12.0.

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings September 29, 2026 17:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Framework-transition and bootstrap changes warrant final human review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

wtgodbe pushed a commit to dotnet/dotnet that referenced this pull request Sep 29, 2026
Match dotnet/arcade#17621 and move the old-bootstrap targeting settings into Arcade's VMR invocation. Leave .NET SDK and PSB inputs unchanged.

Co-authored-by: Copilot <[email protected]>
wtgodbe pushed a commit to dotnet/dotnet that referenced this pull request Sep 29, 2026
Mirror dotnet/arcade#17621 so Arcade's own tests publish for their bundled-SDK framework when the shared default advances to net12.0.

Co-authored-by: Copilot <[email protected]>
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 29, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
@wtgodbe

wtgodbe commented Sep 29, 2026

Copy link
Copy Markdown
Member Author

This is working now - closing in favor of dotnet/dotnet#9722

@wtgodbe wtgodbe closed this Sep 29, 2026
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 29, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 30, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 30, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 30, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
akoeplinger pushed a commit to dotnet/dotnet that referenced this pull request Sep 30, 2026
Bring the final dotnet/arcade#17621 framework-default changes into the VMR while retaining the SDK 11 bootstrap. Remove the redundant hardcoded targeting-pack baseline now supplied by the previously ported Arcade targeting-pack support.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: aab39968-c93b-478a-acee-e9f7b2eefc26
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