Skip to content

Pack the package icon under its own extension, accept JPEG - #11

Merged
vfofanov merged 6 commits into
mainfrom
fix/package-icon-extension
Oct 6, 2026
Merged

vfofanov merged 6 commits into
mainfrom
fix/package-icon-extension

Conversation

@vfofanov

@vfofanov vfofanov commented Oct 6, 2026

Copy link
Copy Markdown
Contributor
  • Pack the icon as icon.<extension>, lowercased (icon.png, icon.jpg); the nuspec names the same file. A JPEG PackageIconPath no longer fails the pack with NU5046.
  • MSKIT_PKG015 accepts a 128×128 PNG or JPEG (nuget.org accepts both) and reads a JPEG's size; the message names the format it found.
  • A PackageIcon the project sets is kept (already guarded; now covered by a test).
  • Tests: tests/package-icon.sh with the PackageIcon fixture — default PNG, JPEG, a wrong-size JPEG, an upper-case .PNG, a project's own icon.
Verification
  • Red first: the JPEG cases failed with NU5046 (7 failures); the upper-case and own-icon cases were green before the fix and guard against a naive icon$(ext).
  • Toggle: with the packing fix reverted the JPEG pack fails with NU5046 again.
  • sh tests/run.sh green locally.

A JPEG PackageIconPath fails the pack with NU5046 today: the kit
packs it as icon.png.
A JPEG PackageIconPath was packed as icon.png and failed the pack
with NU5046. The icon is now packed as icon.<extension>, lowercased,
and the nuspec names that file. nuget.org accepts PNG and JPEG, so
MSKIT_PKG015 reads a JPEG's size too and reports the format it found.
@vfofanov
vfofanov marked this pull request as ready for review October 6, 2026 06:51
The icon lines move from the README to docs/packaging.md and the
reference pages; run.sh keeps both new test files.
@vfofanov
vfofanov merged commit f609b1b into main Oct 6, 2026
4 checks passed
@vfofanov
vfofanov deleted the fix/package-icon-extension branch October 6, 2026 07:05
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.

1 participant