CakeContrib-Icon

Table of Contents

Goals

  • The current cake-contrib icon should be used as icon for the nupkg.
  • The icon should be embedded in the nupkg. (See Reference)
  • iconUrl should - for compatibility reasons - still be added.

Usage

Using this package automatically enables this guideline.

With no special settings at all (i.e. "The Standard"):

  • if no PackageIcon property is specified, a default will be assigned.
  • if no icon (matching the PackageIcon property) is referenced in the project, a default will be referenced.
  • if the referenced icon is not binary equal to the default icon, it will be updated.
  • if no PackageIconUrl property is specified, a default will be assigned.

Settings

Icon include in project

The cake-contrib icon will be automatically included in the project, unless CakeContribGuidelinesIconOmitImport is set to True.

To to use a "custom" import the following could be used:

<PropertyGroup>
    <CakeContribGuidelinesIconOmitImport>True</CakeContribGuidelinesIconOmitImport>
    <PackageIcon>logo.png</PackageIcon>
</PropertyGroup>
<ItemGroup>
    <None Include="icons/logo.png" Pack="True" PackagePath="" />
</ItemGroup>

Migrating from an existing project

No steps are needed anymore. Existing settings will be detected and honored.

Optionally:

  • remove the existing icon
  • remove the Include of the icon from the project-file
  • remove the PackageIcon from the project-file
  • remove the PackageIconUrl from the project-file
GitHub Discussion