Skip to content

Don't include LICENSE.TXT in nuget packages #115518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented May 13, 2025

Runtime nuget packages already define a PackageLicenseExpression=MIT

There's no need to also bundle the LICENSE file into the packages as the nuspec points to the license url.

image

And Arcade already validates that there's either a PackageLicenseExpression or PackageLicenseFile defined: https://github.com/dotnet/arcade/blob/6b63184d8ff276115846b232816ece935a26a22c/src/Microsoft.DotNet.Arcade.Sdk/tools/Workarounds.targets#L65C105-L65C129

Runtime nuget packages already define a PackageLicenseExpression=MIT

There's no need to also bundle the LICENSE file into the packages as the nuspec correctly points to the license site.
@Copilot Copilot AI review requested due to automatic review settings May 13, 2025 16:20
Copy link
Contributor

@Copilot 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 removes the LICENSE file from nuget packages as runtime packages now use PackageLicenseExpression=MIT, eliminating the need for a bundled LICENSE.TXT file.

  • Removed the LICENSE file inclusion in the packaging item group for packable projects
  • Aligns the build with Arcade validation requirements for package licensing

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label May 13, 2025
@ViktorHofer ViktorHofer added area-Infrastructure and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 13, 2025
Copy link
Contributor

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

ViktorHofer added a commit to dotnet/dotnet that referenced this pull request May 13, 2025
Very similar to dotnet/runtime#115518

Don't include the LICENSE file in the shared framework produced packages if those set a PackageLicenseExpression.

As mentioned in the other issue, Arcade already validates that either the license expression or the license file is set.
@ViktorHofer ViktorHofer enabled auto-merge (squash) May 21, 2025 11:38
@ViktorHofer ViktorHofer merged commit 28e603e into main May 21, 2025
151 of 153 checks passed
@akoeplinger akoeplinger deleted the ViktorHofer-patch-1 branch May 21, 2025 12:57
SimaTian pushed a commit that referenced this pull request May 27, 2025
Runtime nuget packages already define a PackageLicenseExpression=MIT

There's no need to also bundle the LICENSE file into the packages as the nuspec correctly points to the license site.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants