NuGet Package Metadata Best Practices
NuGet.org search is driven almost entirely by metadata. The same package with good metadata can rank in the top 10 results; with poor metadata it disappears. This guide covers which fields actually matter, the five mistakes that kill discoverability, and how to validate metadata before you publish.
What metadata fields NuGet.org indexes
NuGet.org full-text search indexes the id, title, description, authors, and tags fields. The description carries the most weight: it is the field users read and the one NuGet.org scores for keyword relevance. The title is displayed in listings but is distinct from the id. Authors and tags contribute to filtering and faceted search. Fields like projectUrl, repository, and licenseExpression do not affect search ranking but do affect whether a package looks trustworthy.
The 5 most commonly neglected fields
Auditing popular packages on NuGet.org reveals the same five fields missing over and over. (1) PackageIcon: packages without an icon show a generic grey square, which signals an unmaintained package. (2) PackageReadmeFile: the README is rendered on the NuGet.org listing page; without it the listing is nearly empty. (3) RepositoryUrl: required for the source link badge and for consumers to file issues. (4) PackageLicenseExpression: packages without a license expression show "No license", which causes some corporate security policies to block installation. (5) PackageReleaseNotes: used by package managers to show changelogs inline.
<PropertyGroup>
<!-- All five commonly neglected fields -->
<PackageIcon>icon.png</PackageIcon>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/myorg/mypackage</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageReleaseNotes>See CHANGELOG.md</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<None Include="icon.png" Pack="true" PackagePath=""/>
<None Include="README.md" Pack="true" PackagePath=""/>
</ItemGroup>Versioning and deprecation metadata
Follow SemVer 2.0 strictly: breaking changes increment the major version, new backwards-compatible features increment minor, and bug fixes increment patch. Use pre-release labels (-alpha, -beta, -rc) for unstable builds. When deprecating a version, use the NuGet Gallery deprecation UI; it marks the version with a warning banner and lets you point consumers to the replacement. Deprecated versions remain installable but IDEs surface the warning at install time. Never delete published versions, as this breaks lock files for downstream consumers.
Validating metadata before publish
Before running dotnet nuget push, open your .nupkg in NuGet Package Explorer (available on the Microsoft Store and as a dotnet tool). It renders the listing exactly as NuGet.org will, flags missing required fields, and lets you inspect the embedded files. Alternatively, host a local NuGet feed with BaGet and install your package into a test project; this catches broken dependencies and missing assets that metadata validation alone misses.
# Install NuGet Package Explorer as a dotnet tool
dotnet tool install -g NuGetPackageExplorer.Tool
# Or validate with the NuGet CLI
nuget verify -All ./bin/Release/MyPackage.1.0.0.nupkgHow NuSpec.AI enforces metadata quality automatically
- ✦Reads your project properties at pack time and surfaces missing or thin metadata as MSBuild warnings; caught in CI before publish.
- ✦Generates a structured AI context file from your public API so every package ships with machine-readable documentation, not just a description string.
- ✦The ultra format cuts context size by 77% vs raw nuspec XML; your AI assistant can reason about the full package surface in one pass.
- ✦No account or license key required. Drop in a PackageReference and go.
- ✦Free and open source under the MIT license.