Skip to content

[main] Source code updates from dotnet/dotnet#126707

Open
dotnet-maestro[bot] wants to merge 3 commits intomainfrom
darc-main-5e3a3675-607c-46e0-8abb-23f3798077c0
Open

[main] Source code updates from dotnet/dotnet#126707
dotnet-maestro[bot] wants to merge 3 commits intomainfrom
darc-main-5e3a3675-607c-46e0-8abb-23f3798077c0

Conversation

@dotnet-maestro
Copy link
Copy Markdown
Contributor

@dotnet-maestro dotnet-maestro bot commented Apr 9, 2026

Note

This is a codeflow update. It may contain both source code changes from
the VMR
as well as dependency updates. Learn more here.

This pull request brings the following source code changes

From https://github.com/dotnet/dotnet

Updated Dependencies

Associated changes in source repos

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/dotnet:0cf6b19ed68d2d52e097e6af6d6046b4eeefefe2..https://github.com/dotnet/runtime:darc-main-5e3a3675-607c-46e0-8abb-23f3798077c0

dotnet-maestro bot added 2 commits April 9, 2026 13:23
Updated Dependencies:
Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.7.0-1.26203.108 -> 5.7.0-1.26208.110)
Microsoft.CodeAnalysis.NetAnalyzers, Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-11.0.100.Transport (Version 11.0.100-preview.4.26203.108 -> 11.0.100-preview.4.26208.110)
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Archives, Microsoft.DotNet.Build.Tasks.Feed, Microsoft.DotNet.Build.Tasks.Installers, Microsoft.DotNet.Build.Tasks.Packaging, Microsoft.DotNet.Build.Tasks.TargetFramework, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Build.Tasks.Workloads, Microsoft.DotNet.CodeAnalysis, Microsoft.DotNet.GenAPI, Microsoft.DotNet.GenFacades, Microsoft.DotNet.Helix.Sdk, Microsoft.DotNet.PackageTesting, Microsoft.DotNet.RemoteExecutor, Microsoft.DotNet.SharedFramework.Sdk, Microsoft.DotNet.XliffTasks, Microsoft.DotNet.XUnitExtensions (Version 11.0.0-beta.26203.108 -> 11.0.0-beta.26208.110)
Microsoft.DotNet.Cecil (Version 0.11.5-preview.26203.108 -> 0.11.5-preview.26208.110)
Microsoft.DotNet.XUnitAssert (Version 3.2.2-beta.26203.108 -> 3.2.2-beta.26208.110)
Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.26203.108 -> 2.9.3-beta.26208.110)
Microsoft.NET.Sdk.IL, Microsoft.NETCore.App.Ref, Microsoft.NETCore.ILAsm, runtime.native.System.IO.Ports, System.Reflection.Metadata, System.Reflection.MetadataLoadContext, System.Text.Json (Version 11.0.0-preview.4.26203.108 -> 11.0.0-preview.4.26208.110)
NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.6.0-rc.20408 -> 7.6.0-rc.20910)
System.CommandLine (Version 3.0.0-preview.4.26203.108 -> 3.0.0-preview.4.26208.110)
[[ commit created by automation ]]
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

@ericstj
Copy link
Copy Markdown
Member

ericstj commented Apr 9, 2026

This contains extensions abstractions move. I'll handle any issues.

@ericstj
Copy link
Copy Markdown
Member

ericstj commented Apr 9, 2026

This is hitting the same issue as dotnet/aspnetcore#66239 (comment). I'll get a fix into VMR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

🤖 Copilot Code Review — PR #126707

Note

This review was generated by GitHub Copilot.

Holistic Assessment

Motivation: This backflow PR promotes 9 Microsoft.Extensions.* abstractions packages (plus 2 source generators) from the AspNetCoreAppLibrary to the NetCoreAppLibrary shared framework. This is a significant and well-motivated architectural change — these fundamental DI, logging, configuration, and options abstractions are widely used outside of ASP.NET Core and belong in the core shared framework.

Approach: The PR follows a consistent pattern: promoted libraries gain conditional == NetCoreAppCurrent ItemGroups with explicit BCL ProjectReferences; downstream consumers make their references to promoted packages conditional via != NetCoreAppCurrent; test projects gate via TargetFrameworkIdentifier == .NETFramework. The PackageOverrides.txt, transport project, and NetCoreAppLibrary.props changes are all mechanically correct.

Summary: ⚠️ Needs Human Review. The overall approach is sound and the conditional reference structure is consistent across the ~100 changed files. No correctness issues found. Two minor duplicate-reference inconsistencies in ref csprojs are worth cleaning up. A human reviewer should confirm the ref/src BCL reference asymmetry is intentional and verify the promoted package set is complete.


Detailed Findings

✅ Correctness — Conditional references are consistent across promoted libs and consumers

Spot-checked all changed csproj files. The pattern is applied correctly:

  • Promoted libs add Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'" groups with BCL deps (System.Runtime, System.Collections, etc.)
  • Consumers gate their promoted-package refs behind '$(TargetFramework)' != '$(NetCoreAppCurrent)'
  • Test projects use '$(TargetFrameworkIdentifier)' == '.NETFramework' which is the correct choice (avoids false matches on TFMs like net11.0-windows)

⚠️ Duplicate ProjectReferences in ref csprojs

Two ref csprojs have references that appear both unconditionally and in the == NetCoreAppCurrent conditional group, creating duplicates for that TFM. MSBuild deduplicates these harmlessly, but it obscures intent and is inconsistent with how other csprojs in this PR handle the same situation.

  1. Microsoft.Extensions.Hosting.Abstractions/ref/Microsoft.Extensions.Hosting.Abstractions.csproj — The unconditional ItemGroup (lines 18–24) includes 5 abstractions packages. The new == NetCoreAppCurrent group (lines 30–38) repeats all 5 plus System.ComponentModel and System.Runtime. Compare with the src csproj for the same library, which cleanly separates them: unconditional refs for the 5 abstractions, conditional group with only System.ComponentModel and System.Runtime.

  2. Microsoft.Extensions.Options/ref/Microsoft.Extensions.Options.csprojMicrosoft.Extensions.Primitives is referenced unconditionally (line 18) and again in the == NetCoreAppCurrent group (line 32).

Suggestion: In Hosting.Abstractions/ref, remove the 5 abstractions from the conditional group (keep only System.ComponentModel and System.Runtime). In Options/ref, remove the duplicate Primitives ref from the conditional group.

💡 Ref vs Src BCL reference asymmetry (confirm intentional)

Several promoted libraries' ref csprojs add fewer BCL ProjectReferences than the corresponding src csprojs. For example, Configuration.Abstractions/ref adds only System.Runtime, while Configuration.Abstractions/src adds System.Collections, System.Linq, and System.Runtime. This is likely intentional (ref assemblies need fewer compilation dependencies than source), but worth confirming that the ref-side lists are complete enough to compile their ref source files.

✅ Packaging and framework plumbing

  • NetCoreAppLibrary.props: 9 packages moved to NetCoreAppLibrary, 2 generators to NetCoreAppLibraryGenerator — alphabetically placed, consistent.
  • PackageOverrides.txt: All 9 promoted packages added with \$\{ProductVersion} — correctly prevents NuGet downgrades.
  • Microsoft.Internal.Runtime.AspNetCore.Transport.proj: Logging and Options generator refs removed (now in NetCoreApp) — correct.
  • OptionsBuilderExtensions.cs: Removed an obsolete UnconditionalSuppressMessage for a long-fixed linker issue — clean.
  • Strings.resx removed from Diagnostics.Abstractions (was empty, only schema/headers) — correct cleanup.
  • NU1511 warning suppression added to 2 test projects — expected when tests reference packages now in the shared framework.

✅ eng/common arcade sync

The tools.ps1 and tools.sh changes add a $warnAsError guard before setting warnnotaserror switches. This correctly avoids passing /warnnotaserror: when warnings aren't being treated as errors in the first place. These are synced from dotnet/arcade and should not be modified here.

✅ Dependency version bumps

Standard automated version bumps from build 309569 (26203.10826208.110) across eng/Version.Details.props, eng/Version.Details.xml, and global.json. No issues.

Generated by Code Review for issue #126707 ·

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant