Add net12 known framework references - #55880
Conversation
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 <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8cc87628-37d4-4689-92d7-63e5457ab266
|
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. |
There was a problem hiding this comment.
Pull request overview
Adds the net12.0 “live/current” known-framework-reference contract to the SDK’s bundled metadata generation, while freezing net11.0 versions and RID lists so future net12 dependency/RID growth doesn’t retroactively change net11 behavior. It also updates the annual rollover guide with the key invariants learned from the net11 transition.
Changes:
- Added full
net12.0KnownFrameworkReference / KnownRuntimePack / tool-pack metadata blocks and newNet120*RID inheritance layers. - Pinned
net11.0runtime/targeting pack versions to preview 7 builds and routed net11 metadata toNet110*RID snapshots. - Rewrote
UpdateToNewTargetFramework.mdinto a repeatable step-by-step process guide with explicit version/RID isolation rules.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Layout/redist/targets/GenerateBundledVersions.targets | Adds net12 known framework metadata and net12 RID layers; pins net11 pack versions and points net11 entries to version-specific RID lists. |
| documentation/general/UpdateToNewTargetFramework.md | Updates the rollover guide with sequencing and explicit “freeze N-1 versions/RIDs” invariants. |
Suppressed comments (4)
src/Layout/redist/targets/GenerateBundledVersions.targets:884
- The net11 WindowsDesktop framework reference is pinned to a prerelease runtime pack version, but DefaultRuntimeFrameworkVersion is hardcoded to "11.0.0". This can cause resolution of a runtime framework version that doesn't exist for the pinned preview build.
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
TargetFramework="net11.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="11.0.0"
LatestRuntimeFrameworkVersion="$(_WindowsDesktop110RuntimePackVersion)"
src/Layout/redist/targets/GenerateBundledVersions.targets:896
- The net11 WPF framework reference is pinned to a prerelease runtime pack version, but DefaultRuntimeFrameworkVersion is hardcoded to "11.0.0". This can make the SDK select a default runtime framework version that isn't available for the pinned preview pack.
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
TargetFramework="net11.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="11.0.0"
LatestRuntimeFrameworkVersion="$(_WindowsDesktop110RuntimePackVersion)"
src/Layout/redist/targets/GenerateBundledVersions.targets:909
- The net11 Windows Forms framework reference is pinned to a prerelease runtime pack version, but DefaultRuntimeFrameworkVersion is hardcoded to "11.0.0". This can break default runtime framework version selection for framework-dependent scenarios.
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
TargetFramework="net11.0"
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
DefaultRuntimeFrameworkVersion="11.0.0"
LatestRuntimeFrameworkVersion="$(_WindowsDesktop110RuntimePackVersion)"
src/Layout/redist/targets/GenerateBundledVersions.targets:922
- The net11 ASP.NET Core framework reference is pinned to a prerelease runtime pack version, but DefaultRuntimeFrameworkVersion is hardcoded to "11.0.0". For prerelease patch-0 versions, the default runtime framework version should remain the full prerelease version to avoid requesting an unavailable GA version.
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
TargetFramework="net11.0"
RuntimeFrameworkName="Microsoft.AspNetCore.App"
DefaultRuntimeFrameworkVersion="11.0.0"
LatestRuntimeFrameworkVersion="$(_AspNet110RuntimePackVersion)"
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 <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8cc87628-37d4-4689-92d7-63e5457ab266
|
@jjonescz Could you review and weigh in on the remaining run-file failures in build 1561353? You own this area and the I locally reproduced representative failures from all three groups: The mismatch is:
My proposed direction is not to remove the warning expectations or reconnect net11 metadata to the live RC1 properties. Instead, Does that match the intended design for file-based apps, or would you prefer a narrower way to pass the frozen pack versions into |
|
Yes, the intended design is for a |
|
Pushed a commit to read the relevant info from BundledVersions.props for the csc-only path of run-file. The remaining CI failures don't seem related to run-file. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8cc87628-37d4-4689-92d7-63e5457ab266
|
Resolved the remaining NativeAOT failure in commit 61fd92e. The test was using the live BundledNETCoreAppPackageVersion (11.0 RC1) for its explicit ILCompiler and NativeAOT package items while the frozen net11 KnownILCompilerPack correctly selected preview 7. That mixed RC1 ILCompiler targets with preview 7 SDK-generated cross-target packs and caused the missing |
|
Passing checks now and test changes look reasonable to me. If this gets merged, it'll break the vmr flow as we're still working through that here: dotnet/dotnet#8542 |
Summary
net12.0known framework and runtime-pack metadata setnet11.0package versions and default runtime versions at the public preview 7 build, and snapshot its version-sensitive RID listsThe temporary net11 pins use
11.0.0-preview.7.26381.103and should move to11.0.$(VersionFeature110)after .NET 11 GA.Tracking: #55851
Validation
GivenUsingDefaultRuntimeFrameworkVersions.DefaultRuntimeVersionsAreUpToDateGivenDotNetUsesMSBuild.ItCanNewRestoreBuildRunCleanMSBuildProjectGivenFrameworkReferencesandKnownRuntimePackTestscoverageMicrosoft.NETCoreSdk.BundledVersions.propsinspection for net10/net11/net12 metadata