Embed LICENSE.txt in NuGet package#14
Merged
Merged
Conversation
Closed
Copilot
AI
changed the title
[WIP] Embed license in NuGet package
Embed LICENSE.txt in NuGet package
Jul 9, 2026
DecSmith42
marked this pull request as ready for review
July 9, 2026 12:00
DecSmith42
approved these changes
Jul 9, 2026
DecSmith42
enabled auto-merge
July 9, 2026 12:02
There was a problem hiding this comment.
Pull request overview
This PR ensures the repository license is properly embedded in the produced NuGet packages by configuring a file-based license (PackageLicenseFile) and packing LICENSE.txt into the .nupkg, aligning with how the icon/readme are handled.
Changes:
- Add
PackageLicenseFilemetadata so NuGet consumers see an explicit license file reference. - Pack the root
LICENSE.txtinto the NuGet package payload.
DecSmith42
disabled auto-merge
July 9, 2026 12:14
- Renamed `readme.md` to `README.md` in `Directory.Build.props`. - Adjusted file paths in `Directory.Build.props` to use `MSBuildThisFileDirectory` for accuracy. - Removed redundant `<None Include>` entries from `_atom.csproj`. - Added `.gitattributes` for consistent end-of-line handling of `*.verified.txt` and `*.received.txt`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repository's
LICENSE.txtwas not being packed into the generated NuGet package(s), leaving consumers without license metadata in the published artifact.Changes
Directory.Build.props: addedPackageLicenseFilepointing toLICENSE.txt, and aPackedNoneitem referencing the rootLICENSE.txt, mirroring the existing pattern used foricon.pngandreadme.md.This applies to all packable projects that import the shared
Directory.Build.props, so no per-project changes are needed.Verified locally that
dotnet packproduces a.nuspecwith:and that
LICENSE.txtis present at the root of the resulting.nupkg.