Skip to content

Conversation

@dsplaisted
Copy link
Member

Fixes #49917

Copilot AI review requested due to automatic review settings August 19, 2025 19:35
@dsplaisted dsplaisted requested a review from a team as a code owner August 19, 2025 19:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes package prune data for .NET Core 2.x by enabling package pruning for netcoreapp2.0 and netcoreapp2.1 target frameworks. The fix removes the framework version condition that was preventing pruning for these versions and updates the framework package definitions to exclude the Microsoft.NETCore.App package from pruning data.

  • Enables package pruning for netcoreapp2.0 and netcoreapp2.1 by removing version-based conditions
  • Removes Microsoft.NETCore.App package entries from netcoreapp2.0 and netcoreapp2.1 framework package definitions
  • Updates test expectations to reflect that pruning now works for these frameworks

Reviewed Changes

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

Show a summary per file
File Description
Microsoft.NET.Sdk.FrameworkReferenceResolution.targets Removes framework version condition that prevented pruning for .NET Core 2.x
FrameworkPackages.netcoreapp2.0.cs Removes Microsoft.NETCore.App package entry from netcoreapp2.0 framework packages
FrameworkPackages.netcoreapp2.1.cs Removes Microsoft.NETCore.App package entry from netcoreapp2.1 framework packages
GivenThatWeWantToResolveConflicts.cs Updates test data to expect pruning to work for netcoreapp2.0 and netcoreapp2.1
RulesMissingDocumentation.md Removes analyzer rule entries that are no longer missing documentation

Comment on lines -5 to -8
CA1873 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1873> | Avoid potentially expensive logging |
CA1874 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1874> | Use 'Regex.IsMatch' |
CA1875 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1875> | Use 'Regex.Count' |
CA2023 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2023> | Invalid braces in message template |
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ViktorHofer We're seeing this file churn when we build locally, is this a change that should be checked in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the same thing too on my machine, so definitely some line endings that need fixed up.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think this needs to get checked-in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsplaisted Was the auto-generation removing these lines? That doesn't look correct to me because at least CA2023 is indeed missing documentation. See #51305

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these rules are actually missing documentation.

@dsplaisted dsplaisted requested review from a team, ericstj and nkolev92 August 19, 2025 19:37
@nkolev92 nkolev92 enabled auto-merge (squash) August 19, 2025 20:40
@nkolev92 nkolev92 disabled auto-merge August 19, 2025 20:40
Comment on lines -5 to -8
CA1873 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1873> | Avoid potentially expensive logging |
CA1874 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1874> | Use 'Regex.IsMatch' |
CA1875 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1875> | Use 'Regex.Count' |
CA2023 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca2023> | Invalid braces in message template |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the same thing too on my machine, so definitely some line endings that need fixed up.

Comment on lines 323 to 324
[InlineData("netcoreapp2.1", true)]
[InlineData("netcoreapp2.0", true)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[InlineData("netcoreapp2.1", true)]
[InlineData("netcoreapp2.0", true)]
[InlineData("netcoreapp2.1")]
[InlineData("netcoreapp2.0")]

@dsplaisted dsplaisted requested review from a team as code owners August 20, 2025 14:19
@dsplaisted dsplaisted changed the base branch from main to release/10.0.1xx August 20, 2025 14:19
@dsplaisted dsplaisted merged commit d6b724e into dotnet:release/10.0.1xx Aug 20, 2025
27 checks passed
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.

Prune data for netcoreapp2.1 and below contains Microsoft.NETCore.App, but it shouldn't

7 participants