[PR #684] [MERGED] Include license in nuget package #1165

Closed
opened 2026-01-29 22:19:18 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/adamhathcock/sharpcompress/pull/684
Author: @daverant
Created: 7/18/2022
Status: Merged
Merged: 7/26/2022
Merged by: @adamhathcock

Base: masterHead: nuget-license


📝 Commits (3)

  • c1d4ac4 Include license when packing
  • 6a69c6c Reference bundled package license file
  • f955031 Hide license in IDE

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 src/SharpCompress/SharpCompress.csproj (+4 -1)

📄 Description

Some licensing tools I use (Snyk) were failing to identify SharpCompress' MIT license as it's not bundled into the Nuget package. This bundles LICENSE.txt in the root of the repo into the package following guidance here.

Before:
image

After:
image

Could alternatively include an SPDX license expression but this wouldn't include specific wording for the author's copyright

<PropertyGroup>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/adamhathcock/sharpcompress/pull/684 **Author:** [@daverant](https://github.com/daverant) **Created:** 7/18/2022 **Status:** ✅ Merged **Merged:** 7/26/2022 **Merged by:** [@adamhathcock](https://github.com/adamhathcock) **Base:** `master` ← **Head:** `nuget-license` --- ### 📝 Commits (3) - [`c1d4ac4`](https://github.com/adamhathcock/sharpcompress/commit/c1d4ac45aba52952cf1573a82c3f769c73c8beb4) Include license when packing - [`6a69c6c`](https://github.com/adamhathcock/sharpcompress/commit/6a69c6cd021b5c1bd681fcbfafaf8a91048346f1) Reference bundled package license file - [`f955031`](https://github.com/adamhathcock/sharpcompress/commit/f955031e27957a6272500da14b912231a3c36b2a) Hide license in IDE ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/SharpCompress/SharpCompress.csproj` (+4 -1) </details> ### 📄 Description Some licensing tools I use (Snyk) were failing to identify SharpCompress' MIT license as it's not bundled into the Nuget package. This bundles LICENSE.txt in the root of the repo into the package following guidance [here](https://docs.microsoft.com/en-gb/nuget/reference/msbuild-targets#packing-a-license-expression-or-a-license-file). Before: ![image](https://user-images.githubusercontent.com/1042253/179556910-9ea69285-5281-43dc-8807-1e9e70efc538.png) After: ![image](https://user-images.githubusercontent.com/1042253/179556955-5c582b2a-410c-4f9c-bc69-e2161e47a41a.png) Could alternatively include an SPDX license expression but this [wouldn't include specific wording for the author's copyright](https://licenses.nuget.org/MIT) ``` <PropertyGroup> <PackageLicenseExpression>MIT</PackageLicenseExpression> </PropertyGroup> ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 22:19:18 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#1165