Pack and Push Errors
|
This section documents MSBuild 18.9, the .NET SDK 10.0.402 (with its This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. The C# Reference bibliography lists the reference material consulted while preparing these pages. |
This page collects the diagnostics from the publishing group in one place. Messages marked (run) were produced in
this section with .NET SDK 10.0.402 (NuGet 7.9.0), from one-file projects or the Ledgerline scenario, and are
quoted as printed (paths shortened, the [project] suffix removed); the others are quoted from their reference page
and say so. Each code links to its NuGet reference page. Consumer-side codes (restore, audit, sources) are on
Troubleshooting NuGet Errors and Warnings.
Metadata
| Code | Message | Fix |
|---|---|---|
|
Pack the file: |
|
|
Use a current SPDX identifier ( |
|
|
Keep one. |
|
|
Remove |
|
|
Use Markdown. |
|
|
Pack the README. |
|
|
Write it. |
|
|
PNG or JPEG. |
|
|
Pack the icon. |
|
|
Shrink it; 128×128 is enough. |
|
|
Embed the icon with |
|
Documented as a warning about IDs outside letters, digits, dots and dashes. On 10.0.402 invalid IDs failed with uncoded errors instead: |
Fix the |
|
|
Check the SPDX list; nuget.org validates on upload. |
|
|
Use |
Contents and layout
| Code | Message | Fix |
|---|---|---|
|
Something must be packed. |
|
|
Build before |
|
"The pack command for SDK-style projects is not supported, use dotnet pack or msbuild -t:pack to pack this project instead. …" (documented; |
Use |
|
|
|
|
|
Expected for tool, task and analyzer packages; otherwise move it to |
|
NU5101 |
|
Use |
|
Prerelease this package too, or wait for a stable dependency. |
|
|
One item per |
|
"File '…\Libuv.1.10.0.nupkg' was not added to the package. Files and folders starting with '.' or ending with '.nupkg' are excluded by default. …" (documented; an explicit item for a dot-folder packed without it on 10.0.402) |
|
|
|
Shorten it. |
|
|
Add the |
|
|
Align folders and groups, or suppress for build-only packages. |
|
|
Name the file after the package ID. |
|
|
Match |
|
"The following dependency group(s) require(s) dots in the framework version: net50-windows7.0" (documented; a hand-written |
Write |
Validation and tools
| Code | Message | Fix |
|---|---|---|
|
Same public API on compatible frameworks. |
|
|
Restore the member, or suppress for a major version. |
|
|
Strict mode is for patch releases. |
|
|
Keep the framework, or suppress for a major version. |
|
NETSDK1047 |
|
Add |
NETSDK1235 |
|
Drop |
Signing
| Code | Message | Fix |
|---|---|---|
NU3002 |
|
Pass |
|
A valid chain; for test certificates, |
|
|
Timestamp the signature. |
|
NU3034 |
|
Add |
NU3042 |
|
Expected for test certificates. |
Details: Signing Packages.
Push
| Status | Message | Cause |
|---|---|---|
401 |
|
Wrong, expired or missing API key; on nuget.org also a key from another owner. |
403 |
Not reproduced. Documented causes: Azure Artifacts without the Feed Publisher (Contributor) role; GitHub Packages intermittently during restore without source mapping. |
Grant the role; add source mapping. |
409 |
|
The version exists; publish a new one or use |
413 |
|
Packages over about 250 MB; split them. |
nuget.org’s own wording for 409 and for a key whose scope doesn’t cover the package is not documented; the codes
are the same, the messages above come from BaGetter.
Details: Publishing to nuget.org, Private Feeds.