Skip to content

Enabling nullability in NuGet.Packaging - Annotate ContentModel, LicenseMetadata & some extraction types - #7195

Merged
nkolev92 merged 2 commits into
devfrom
dev-nkolev92-nullablePackaging-3
Mar 10, 2026
Merged

nkolev92 merged 2 commits into
devfrom
dev-nkolev92-nullablePackaging-3

Conversation

@nkolev92

@nkolev92 nkolev92 commented Mar 6, 2026 •

Copy link
Copy Markdown
Member

Bug

Progress: NuGet/Home#14778

Description

Continuation of #7178.

The gist here is the NuspecReader, PackageArchiveReader and coming soon and those are a bit more complex so just pushing a PR with the relatively simpler types.

  • Annotate LicenseMetadata. Simple enough type and well documented. Advantage of a post project.json prototype types :D
  • Annotated src/NuGet.Core/NuGet.Packaging/ContentModel - This is the brunt work here. Note that I added a required keyword to the Asset type and that's not an ABI breaking change since required is enforced at compile time. I don't see any usage of these types otherwise.
  • Annotated some src/NuGet.Core/NuGet.Packaging/PackageExtraction APIs.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@nkolev92
nkolev92 marked this pull request as ready for review March 6, 2026 19:15
@nkolev92
nkolev92 requested a review from a team as a code owner March 6, 2026 19:15
@nkolev92 nkolev92 changed the title Enabling nullability in NuGet.Packaging - Annotate ContentModel Enabling nullability in NuGet.Packaging - Annotate ContentModel, LicenseMetadata & some extraction types Mar 6, 2026

@donnie-msft donnie-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎉 To "Advantage of a post project.json"
🎉 Net reduction of code!

@nkolev92
nkolev92 merged commit 2233ffd into dev Mar 10, 2026
16 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-nullablePackaging-3 branch March 10, 2026 00:53
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.

3 participants