Repository navigation
Retarget SDK sources to net12.0 without updating stage zero - #56348
Closed
marcpopMSFT wants to merge 4 commits into
Closed
marcpopMSFT wants to merge 4 commits into
marcpopMSFT wants to merge 4 commits into
Conversation
Use Arcade net11 targeting-pack metadata as the net12 baseline, update task layouts and API baselines, and keep product defaults and external tool TFMs unchanged. Add scoped bootstrap compatibility settings and layout regression coverage, and document the split rollover. Co-authored-by: Copilot App <[email protected]>
marcpopMSFT
requested review from
a team,
lbussell and
mthalman
as code owners
September 17, 2026 21:47
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
It changes repo-wide TFMs and multiple MSBuild task/tool resolution paths with broad blast radius, so it needs human validation beyond the targeted regressions included here.
Pull request overview
Retargets the SDK’s build outputs and tool/task lookup paths to net12.0 while keeping the pinned stage-0 SDK and product packs on .NET 11, including temporary bootstrap workarounds and regression coverage to validate the updated layout.
Changes:
- Retarget SDK source/build TFMs to
net12.0while using Arcade’snet11.0targeting-pack baseline and adding temporary bootstrap accommodations (prune data + ASP.NET Core KnownFrameworkReference baseline copy). - Update MSBuild targets/props that resolve SDK task/tool assemblies (Build.Tasks, Razor/SWA/Blazor tools, Publish, ApiCompat, Containers) to look under
net12.0folders; pin select external package paths tonet11.0where producers haven’t retargeted yet. - Update tests and contributor documentation for the “source-only retarget” phase; add task-layout regression tests and introduce
ToolsetInfo.SdkTargetFramework.
File summaries
| File | Description |
|---|---|
| test/Microsoft.NET.TestFramework/ToolsetInfo.cs | Introduces SdkTargetFramework constant (net12.0) to distinguish compiled SDK TFM from generated-app defaults. |
| test/Microsoft.NET.Sdk.Web.Tests/PublishTests.cs | Updates compile-time TFM guard from NET11_0 to NET12_0. |
| test/Microsoft.NET.Sdk.StaticWebAssets.Tests/Microsoft.NET.Sdk.StaticWebAssets.Tests.csproj | Pins ASP.NET test-app metadata TFM to net11.0. |
| test/Microsoft.NET.Sdk.Razor.Tests/Microsoft.NET.Sdk.Razor.Tests.csproj | Pins ASP.NET test-app metadata TFM to net11.0. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.Tests/Microsoft.NET.Sdk.BlazorWebAssembly.Tests.csproj | Pins ASP.NET test-app metadata TFM to net11.0. |
| test/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests/Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.csproj | Pins ASP.NET test-app metadata TFM to net11.0. |
| test/Microsoft.NET.Publish.Tests/PublishTestUtils.cs | Updates compile-time TFM guard from NET11_0 to NET12_0. |
| test/Microsoft.NET.Build.Tests/GivenTheSdkTaskLayout.cs | Adds regression test asserting SDK task assemblies are deployed under ToolsetInfo.SdkTargetFramework and validates ApiCompat deployment. |
| test/Microsoft.NET.Build.Containers.IntegrationTests/PackageTests.cs | Updates containers package content test to validate net12.0 task folder layout. |
| src/WebSdk/Publish/Targets/Microsoft.NET.Sdk.Publish.targets | Switches publish task lookup to net12.0 under Core MSBuild. |
| src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.Common.targets | Switches core tasks directory TFM from net11.0 to net12.0. |
| src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.targets | Updates ApiCompat task path to net12.0. |
| src/Tasks/Microsoft.NET.Build.Extensions.Tasks/msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/Microsoft.NET.Build.Extensions.targets | Updates extensions task path to net12.0 for Core MSBuild. |
| src/StaticWebAssetsSdk/Targets/Sdk.StaticWebAssets.CurrentVersion.targets | Updates Static Web Assets tasks/tool lookup paths to net12.0. |
| src/RazorSdk/Targets/Sdk.Razor.CurrentVersion.targets | Updates Razor tasks lookup path to net12.0. |
| src/Layout/redist/tools/tool_fsc.csproj | Temporarily pins F# tool layout TFM to net11.0 pending upstream retarget. |
| src/Layout/redist/targets/Crossgen.targets | Temporarily pins WindowsDesktop tool layout path to net11.0 pending upstream retarget. |
| src/Containers/packaging/build/Microsoft.NET.Build.Containers.props | Updates container task folder TFM to net12.0. |
| src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net12.0/PublicAPI.Unshipped.txt | Adds new net12 public API baseline file for Containers. |
| src/Containers/Microsoft.NET.Build.Containers/PublicAPI/net12.0/PublicAPI.Shipped.txt | Adds new net12 shipped baseline placeholder for Containers. |
| src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets | Updates Blazor WASM tasks/tool lookup paths to net12.0. |
| src/BlazorWasmSdk/Targets/Microsoft.NET.Sdk.BlazorWebAssembly.5_0.targets | Updates Blazor WASM tasks/tool lookup paths to net12.0. |
| documentation/general/UpdateToNewTargetFramework.md | Documents the new “retarget sources independently of bootstrap SDK” step and temporary accommodations. |
| Directory.Build.targets | Adds conditional AllowMissingPrunePackageData and an ASP.NET Core KnownFrameworkReference baseline copy for stage-0 builds. |
| Directory.Build.props | Sets NetCurrent to net12.0 and configures explicit targeting-pack baseline/current TFMs plus NETCoreAppMaximumVersion. |
| .github/memory/API_MAP.md | Updates API-map doc link to the containers net12 baseline. |
Review details
- Files reviewed: 24/26 changed files
- Comments generated: 5
- Review effort level: Lite
Use live baseline framework packs and nearest-framework pruning data while keeping stage zero unchanged. Resolve watch test tasks from the SDK source TFM and guard against duplicate framework DI assemblies in the SDK layout. Co-authored-by: Copilot App <[email protected]>
Isolate VSTest console output from build logging and replace cross-process module inspection with per-test active-run markers. Retry localization directory cleanup with the existing bounded helper and explicitly use the SDK under test. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
marcpopMSFT
added a commit
to dotnet/dotnet
that referenced
this pull request
Sep 21, 2026
Port dotnet/sdk#56348 follow-ups through 006c74304ad: align live baseline packs and pruning data, fix watch lookup, stabilize CLI and localization tests, and clarify container API documentation. Preserve VMR source-only pack overrides and bootstrap compatibility fixes. Co-authored-by: Copilot App <[email protected]>
9 of 31 tasks
Member
Author
|
closed in favor of dotnet/dotnet#9076 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Separates source retargeting from the stage-0 SDK update, following Viktor's suggestion. This keeps the net12 transition smaller while leaving both SDK version entries in
global.jsonunchanged.Approach
net12.0and use Arcade's explicitnet11.0targeting-pack baseline. The reference APIs and execution runtime remain on .NET 11 during this phase.net12.0. Keep externally produced F# and WindowsDesktop tool paths on their actual packaged TFM, and preserve ApiCompat's lower compilation target.Temporary bootstrap accommodations
The pinned Arcade does not synthesize ASP.NET Core framework references, so a conditional baseline copy fills that gap. The older SDK also lacks net12 package-pruning data;
LoadPrunePackageDataFromNearestFrameworkuses the baseline framework's data. Live Core and ASP.NET reference-pack overrides also recognize the explicit baseline version so net12 sources resolve against the flowed net11 packs, not the older stage-0 packs. These accommodations are scoped to the new source TFM, including platform-qualified variants, and the older bootstrap, and are documented for cleanup during the bootstrap transition.CI follow-up fixes
dotnet test --no-build -v ..., so build output cannot split the VSTest result lines being asserted.Win32Exception (299)while preserving parallel-versus-sequential assertions. Update both consumers of the asset.Validation
11.0.100-rc.1.26420.103; a fresh redist rebuild also succeeded after pack-alignment changes.diagverbosity row remained skipped in each run. These cover verbosity, both multi-TFM modes, the binary-log asset consumer, and all four localization cases.net12.0runtimeconfig TFM and a .NET 11 runtime requirement.The build reports four NU1903 warnings for existing
System.Formats.Asn15.0.0 analyzer-test dependencies; no package changes or warning suppressions are included. Full-suite, source-only build mode, and cross-architecture validation were not run locally. CI must validate the latest commit.