Packages containing Icon and License
Currently, the NuGet schema only allows the package author to specify the
IconUrl as external URLs for the license and icon respectively. This puts the burden on the developer to find a place to host those files and update the NuSpec with their locations.
The NuGet Gallery should support unpacking a license and icon within the package folder both explicitly specified and by convention.
Convention Based Approach
The convention based approach is very simple.
||An Icon.png at the root of the package will be unpacked and used as the icon for the package
||A license.txt file at the root of the package will be used as the license
Alternatively, we can support explicit references using the file:// prefixed URLs relative to the package root. For example:
This grabs the file from the content/images folder of the package and hosts it on the server. This is useful in cases where the icon is also hosted.
Device Specific Icon Images
There a multiple places where icons are displayed.
- NuGet Dialog (32x32)
- NuGet.org packages list (50x50)
- NuGet.org package details page (100x100)
We should consider a convention that allows developers to include an icon specific to each of these devices.
Use a file extension for each.
- Icon_dialog.png (32x32)
- Icon_list.png (50x50)
- Icon_details.png (100x100)