Skip to content

Add net12 known framework references - #8542

Merged
marcpopMSFT merged 9 commits into
mainfrom
marcpopmsft-port-sdk-net12-framework-references
Aug 31, 2026
Merged

marcpopMSFT merged 9 commits into
mainfrom
marcpopmsft-port-sdk-net12-framework-references

Conversation

@marcpopMSFT

Copy link
Copy Markdown
Member

Port of dotnet/sdk#55880 to accelerate VMR flow while review and testing continue in the SDK repository.

Summary

  • Add the complete live net12.0 known framework and runtime-pack metadata set.
  • Freeze net11.0 package versions and default runtime versions at the public preview 7 build, including version-sensitive RID lists.
  • Add explicit net12 RID inheritance boundaries so future runtime flows do not change net11 metadata.
  • Update the annual target-framework rollover guide with the package-version and RID invariants learned from net11.

The temporary net11 pins use 11.0.0-preview.7.26381.103 and should move to 11.0.$(VersionFeature110) after .NET 11 GA.

Tracking: dotnet/sdk#55851

Validation

Not run locally; this is an exact two-commit port of the SDK PR for VMR validation.

Freeze net11 package and RID metadata while adding the live net12 framework reference block. Refresh the annual target framework rollover guide with the invariants learned from the net11 transition.

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

Copilot-Session: 8cc87628-37d4-4689-92d7-63e5457ab266
Use the frozen preview 7 runtime versions as DefaultRuntimeFrameworkVersion for net11 known framework references so prerelease applications resolve and launch correctly.

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

Copilot-Session: 8cc87628-37d4-4689-92d7-63e5457ab266
Copilot AI lite review requested due to automatic review settings August 21, 2026 22:37
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team August 21, 2026 22:37
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 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.

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.

Pull request overview

Ports dotnet/sdk changes into the VMR to introduce net12.0 known framework/runtime-pack metadata while freezing net11.0 metadata to pinned preview package versions, reducing churn during ongoing .NET 12 onboarding and dependency flow.

Changes:

  • Add net12.0 KnownFrameworkReference / Known*Pack entries and update “current” RID alias layers to Net120*.
  • Freeze net11.0 KnownFrameworkReference / Known*Pack versions to explicit 11.0.0-preview.7.26381.103 properties and point net11.0 blocks at Net110* RID snapshots.
  • Rewrite the “Update to new target framework” guide to document the repeatable rollover sequence and invariants (package-version pins + per-TFM RID boundaries).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/sdk/src/Layout/redist/targets/GenerateBundledVersions.targets Adds net12.0 known framework references, introduces Net120* RID boundary layers, and pins net11.0 pack versions to prevent backward metadata drift.
src/sdk/documentation/general/UpdateToNewTargetFramework.md Updates the rollover guide with the recommended sequence and explicit invariants learned from the net11 → net12 transition work.

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

Override RuntimeFrameworkVersion for nested scenario-test builds when TestFxVersion is supplied, so generated applications target the runtime installed by the VMR test leg.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team August 24, 2026 21:59
Override the frozen net11 framework and targeting pack versions when building the SDK from source so source-build tests consume the packs produced by the current VMR build.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
Allow source-build to override frozen net11 pack versions, derive runtime and ASP.NET versions from their respective produced packages, and include the source-built RID in net11 metadata before net12 inherits it.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
ViktorHofer

This comment was marked as duplicate.

@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.

The changes in repo-projects/Directory.Build.targets look wrong to me. We shouldn't pass these additional global properties in to every repository. That pollutes the inputs of all inner repos while only sdk needs them.

Also, we shouldn't pass underscore properties in as global properties. I wouldn't pass any of those in and instead condition the logic in GenerateBundledVersions.targets logic on the existing global properties, i.e. KnownFrameworkReferenceMicrosoftNETCoreAppCurrentTargetingPackVersion and introduce the two additional global properties for the aspnetcore targeting and runtime pack.

Btw, all these properties enable the following infrastructure in arcade to make SB target the latest versions automatically: https://github.com/dotnet/arcade/blob/6e8b73df4173e497174229e0acbda23b30f7ed96/src/Microsoft.DotNet.Arcade.Sdk/tools/TargetingPacks.BeforeCommonTargets.targets#L139

So the SDK might be able to not do anything special at all and just set EnableKnownPackVersionUpdatesForCurrentTargetFramework=true in redist.csproj.

Restore the VMR repository property flow and have SDK redist generation consume the existing public current-framework overrides when producing source-built net11 metadata.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
@marcpopMSFT

Copy link
Copy Markdown
Member Author

🤖 Reworked this along the proposed path in 8642c1c:

  • Restored repo-projects/Directory.Build.targets to its original public known-pack property flow; no underscore-prefixed properties or ASP.NET-specific properties are passed to inner repos.
  • Explicitly enabled current-framework known-pack updates for redist.csproj.
  • GenerateBundledVersions.targets now uses the existing public NETCore current-framework override as the signal to replace frozen net11 values. ASP.NET versions come from the SDK's existing live MicrosoftAspNetCoreApp*PackageVersion properties, so additional VMR globals are unnecessary.
  • The source-build ProductMonikerRid is added at the net11 boundary before net12 inherits the RID lists. This is still required because the generated bundled metadata is consumed by scenario-test projects after the SDK build; Arcade's in-memory item updates during redist evaluation do not rewrite that generated metadata.

This preserves the preview-7 fallback when no current-framework override is supplied.

Arcade enables current-framework known-pack updates by default. Source-build remains distinguished by the public version override supplied by the VMR, while regular builds retain the pinned preview 7 fallback.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
@marcpopMSFT
marcpopMSFT enabled auto-merge (squash) August 27, 2026 23:00
Keep preview 7 metadata for product builds, but override net11 runtime and ASP.NET versions from SDK-local live package properties in source-build. Move the existing product RID additions to the net11 item boundaries so frozen metadata can resolve source-built packs without VMR-specific property flow.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
@marcpopMSFT

Copy link
Copy Markdown
Member Author

🤖 Reworked the source-build fix in 32d3abc3f13 to use the SDK-local package properties directly:

  • Product builds keep the frozen 11.0.0-preview.7.26381.103 values.
  • DotNetBuildSourceOnly=true overrides the net11 NETCore and ASP.NET values with MicrosoftNETCoreApp*PackageVersion and MicrosoftAspNetCoreApp*PackageVersion.
  • There is no dependency on EnableKnownPackVersionUpdatesForCurrentTargetFramework or the VMR-flowed KnownFrameworkReference* properties.
  • The existing ProductMonikerRid additions for apphost, runtime, ASP.NET runtime, Crossgen2, and ILCompiler now occur at the net11 item boundaries, so net11 and net12 inherit them. Crossgen2/ILCompiler portable RID snapshots remain free of the non-portable source-build RID.
  • Added TODOs to remove the temporary source-build version and net11 RID overrides when stable .NET 11 targeting packs are available in SBRP.

repo-projects/Directory.Build.targets remains restored to its pre-workaround state.

Retain the existing latest-TFM ProductMonikerRid additions alongside the temporary .NET 11-specific source-build workaround.

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

Copilot-Session: 4de822fd-3fe2-4078-b206-a8570dfabdf1
@marcpopMSFT

Copy link
Copy Markdown
Member Author

🤖 Applied Viktor's latest feedback in commit 893fae4. The existing latest-TFM ProductMonikerRid additions are restored unchanged, while the temporary .NET 11-specific source-build RID additions remain in place. This intentionally allows the source-built RID to appear twice in the latest TFM lists until the temporary .NET 11 workaround can be removed.

@marcpopMSFT
marcpopMSFT disabled auto-merge August 31, 2026 18:49
@marcpopMSFT
marcpopMSFT enabled auto-merge (squash) August 31, 2026 18:49
@marcpopMSFT
marcpopMSFT merged commit ccf70e6 into main Aug 31, 2026
11 checks passed
@marcpopMSFT
marcpopMSFT deleted the marcpopmsft-port-sdk-net12-framework-references branch August 31, 2026 20:44
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.

4 participants