Skip to content

Commit ebdb6a6

Browse files
committed
Introduced icon for the NuGet packages
By placing the icon in the root, explicitly setting it to be packed, and then referencing it as the `<PackageIcon />` in the `Directory.Build.props`, we can ensure that every project ends up with the same icon. For now, we're using the Ignia logo as the icon, and have set it to 128x128 per NuGet recommendations. Note that in order to pack the file, the `<None />` reference needed to crawl back one directory, since the `<ItemGroup />` will be evaluated in context of each individual `csproj`. The `<PackageIcon />` doesn't require this, however, since the `<None />` reference will ensure it's in the root of the `*.nupkg` file.
1 parent 3e68b16 commit ebdb6a6

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,13 @@
1818
<IncludeSymbols>true</IncludeSymbols>
1919
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2020
<GenerateDocumentationFile>true</GenerateDocumentationFile>
21+
<PackageIcon>Icon.png</PackageIcon>
2122
</PropertyGroup>
2223

24+
<ItemGroup>
25+
<None Include="../Icon.png" Pack="true" PackagePath=""/>
26+
</ItemGroup>
27+
2328
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
2429
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
2530
</PropertyGroup>

Icon.png

5.33 KB
Loading

OnTopic.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2020
.gitignore = .gitignore
2121
Directory.Build.props = Directory.Build.props
2222
GitVersion.yml = GitVersion.yml
23+
Icon.png = Icon.png
2324
README.md = README.md
2425
EndProjectSection
2526
EndProject

0 commit comments

Comments
 (0)