Skip to content

[release/11.0-preview4] Source code updates from dotnet/dotnet#127418

Open
dotnet-maestro[bot] wants to merge 3 commits intorelease/11.0-preview4from
darc-release/11.0-preview4-fc6d5772-ad96-4a2e-861f-40d0c2998897
Open

[release/11.0-preview4] Source code updates from dotnet/dotnet#127418
dotnet-maestro[bot] wants to merge 3 commits intorelease/11.0-preview4from
darc-release/11.0-preview4-fc6d5772-ad96-4a2e-861f-40d0c2998897

Conversation

@dotnet-maestro
Copy link
Copy Markdown
Contributor

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

  • From 5.7.0-1.26211.102 to 5.7.0-1.26224.122
    • Microsoft.CodeAnalysis
    • Microsoft.CodeAnalysis.Analyzers
    • Microsoft.CodeAnalysis.CSharp
    • Microsoft.Net.Compilers.Toolset
  • From 11.0.100-preview.4.26211.102 to 11.0.100-preview.4.26224.122
    • Microsoft.CodeAnalysis.NetAnalyzers
    • Microsoft.DotNet.ApiCompat.Task
    • Microsoft.NET.Workload.Emscripten.Current.Manifest-11.0.100.Transport
  • From 11.0.0-beta.26211.102 to 11.0.0-beta.26224.122
    • 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
  • From 0.11.5-preview.26211.102 to 0.11.5-preview.26224.122
    • Microsoft.DotNet.Cecil
  • From 3.2.2-beta.26211.102 to 3.2.2-beta.26224.122
    • Microsoft.DotNet.XUnitAssert
  • From 2.9.3-beta.26211.102 to 2.9.3-beta.26224.122
    • Microsoft.DotNet.XUnitConsoleRunner
  • From 11.0.0-preview.4.26211.102 to 11.0.0-preview.4.26224.122
    • 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
  • From 7.6.0-rc.21202 to 7.7.0-rc.22522
    • NuGet.Frameworks
    • NuGet.Packaging
    • NuGet.ProjectModel
    • NuGet.Versioning
  • From 3.0.0-preview.4.26211.102 to 3.0.0-preview.4.26224.122
    • System.CommandLine
  • From 19.1.0-alpha.1.26173.1 to 19.1.0-alpha.1.26208.2
    • runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
    • runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools
    • runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang
    • runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk
    • runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools
  • From 11.0.0-alpha.1.26173.2 to 11.0.0-alpha.1.26208.5
    • runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport
    • runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport

Associated changes in source repos

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/dotnet:48bd87d899e187fe0e4e2b81a7b4a65a37845213..https://github.com/dotnet/runtime:darc-release/11.0-preview4-fc6d5772-ad96-4a2e-861f-40d0c2998897

Updated Dependencies:
Microsoft.CodeAnalysis, Microsoft.CodeAnalysis.Analyzers, Microsoft.CodeAnalysis.CSharp, Microsoft.Net.Compilers.Toolset (Version 5.7.0-1.26211.102 -> 5.7.0-1.26224.122)
Microsoft.CodeAnalysis.NetAnalyzers, Microsoft.DotNet.ApiCompat.Task, Microsoft.NET.Workload.Emscripten.Current.Manifest-11.0.100.Transport (Version 11.0.100-preview.4.26211.102 -> 11.0.100-preview.4.26224.122)
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.26211.102 -> 11.0.0-beta.26224.122)
Microsoft.DotNet.Cecil (Version 0.11.5-preview.26211.102 -> 0.11.5-preview.26224.122)
Microsoft.DotNet.XUnitAssert (Version 3.2.2-beta.26211.102 -> 3.2.2-beta.26224.122)
Microsoft.DotNet.XUnitConsoleRunner (Version 2.9.3-beta.26211.102 -> 2.9.3-beta.26224.122)
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.26211.102 -> 11.0.0-preview.4.26224.122)
NuGet.Frameworks, NuGet.Packaging, NuGet.ProjectModel, NuGet.Versioning (Version 7.6.0-rc.21202 -> 7.7.0-rc.22522)
System.CommandLine (Version 3.0.0-preview.4.26211.102 -> 3.0.0-preview.4.26224.122)
runtime.linux-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.win-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.win-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.osx-arm64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.osx-x64.Microsoft.NETCore.Runtime.JIT.Tools, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.win-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.osx-arm64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Libclang, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Sdk, runtime.osx-x64.Microsoft.NETCore.Runtime.Mono.LLVM.Tools (Version 19.1.0-alpha.1.26173.1 -> 19.1.0-alpha.1.26208.2)
runtime.linux-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-musl-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.linux-musl-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.osx-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.osx-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.win-arm64.Microsoft.NETCore.Runtime.Wasm.Node.Transport, runtime.win-x64.Microsoft.NETCore.Runtime.Wasm.Node.Transport (Version 11.0.0-alpha.1.26173.2 -> 11.0.0-alpha.1.26208.5)
[[ commit created by automation ]]
Avoid ProjectReference pruning errors for shared framework Extensions assemblies in the affected test projects and generated trimming test projects.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🤖 Copilot Code Review — PR #127418

Note

This review was generated by Copilot.

Holistic Assessment

Motivation: The PR addresses NU1511 ("pruning") warnings caused by explicit ProjectReference entries to shared framework assemblies that are either redundant (already available transitively or via the shared framework) in trimming test .proj files, or unavoidable in regular test .csproj files. The problem is real — these are build warnings that should be cleaned up.

Approach: The fix takes two complementary approaches: (1) remove redundant AdditionalProjectReferences entries for assemblies that are already part of the shared framework or brought in transitively, and (2) suppress NU1511 at the project level in the one test csproj where the explicit ProjectReference is required but per-reference suppression is blocked by a known NuGet bug (NuGet/Home#14121). Both approaches are appropriate.

Summary: ✅ LGTM. This is a small, correct, and well-scoped fix. The changes are safe — they only affect build warning behavior, not test execution or runtime behavior. All removed references are demonstrably redundant.


Detailed Findings

✅ Correctness — Removed references are genuinely redundant

Hosting TrimmingTests: Microsoft.Extensions.Hosting.Abstractions was removed from AdditionalProjectReferences. This is correct because:

  • Microsoft.Extensions.Hosting (the library under test) has a direct ProjectReference to Hosting.Abstractions in its own .csproj.
  • Both are shared framework libraries listed in NetCoreAppLibrary.props.
  • The trimming test source (AddHostedServiceTests.cs) uses IHostedService and other types from Hosting.Abstractions, which are satisfied transitively through Hosting.

Options TrimmingTests: Microsoft.Extensions.Options was removed from AdditionalProjectReferences. This is correct because:

  • Microsoft.Extensions.Options is a shared framework library, so its types are already available without an explicit P2P reference.
  • The test source (ConfigureTests.cs) uses Options types like IOptions<T>, IOptionsMonitor<T>, IValidateOptions<T>, etc., resolved from the shared framework.
  • The source generator reference (Microsoft.Extensions.Options.SourceGeneration.csproj) is retained via the separate _additionalProjectReference item, which is correct.

✅ NU1511 suppression is appropriate and well-documented

The <NoWarn>$(NoWarn);NU1511</NoWarn> added to Microsoft.Extensions.Hosting.Abstractions.Tests.csproj is project-wide because per-ProjectReference suppression doesn't work (NuGet bug). The comment explains the reason and links to the upstream issue. This matches the established pattern used in other test projects (e.g., Microsoft.Extensions.Logging.Tests.csproj, System.Collections.Immutable.Tests.csproj).

💡 Potential follow-up — Other trimming tests with self-referencing patterns

A few other trimming test .proj files list their own library in AdditionalProjectReferences for shared framework libraries:

  • Microsoft.Extensions.Http.TrimmingTests.proj → lists Microsoft.Extensions.Http
  • Microsoft.Extensions.Logging.Console.TrimmingTests.proj → lists Microsoft.Extensions.Logging.Console
  • Microsoft.Extensions.DependencyInjection.TrimmingTests.proj → lists Microsoft.Extensions.DependencyInjection

These may or may not produce NU1511 warnings depending on their build configuration, but if they do, the same removal pattern applied here would be appropriate. Not blocking — just flagging for awareness as a potential follow-up cleanup.

Generated by Code Review for issue #127418 ·

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

Labels

area-codeflow for labeling automated codeflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant