Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add an icon to a nuget package?

Tags:

We are hosting our own nuget server through Teamcity. Is there any other way to add an icon to a .nuspec file other than specifying a web url (http://....)?

Or is there a place in Teamcity that these icons could be hosted?

like image 417
Michael Avatar asked Jul 12 '16 12:07

Michael


1 Answers

As of NuGet 5.3.0 you can now use <icon> to provide a relative path to your JPEG or PNG icon file located within your package.

<package>   <metadata>     ...     <icon>images\icon.png</icon>     ...   </metadata>   <files>     ...     <file src="..\icon.png" target="images\" />     ...   </files> </package> 

Source: https://docs.microsoft.com/en-us/nuget/reference/nuspec#icon

<iconUrl> is now deprecated.

like image 139
Wiktor Bednarz Avatar answered Sep 24 '22 06:09

Wiktor Bednarz