Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget Package Icon Not getting Displayed

I'm developing an Nuget Package. I have icon.png placed inside Images folder inside my package code. In my .csproj file I have added required tags related to icon. But still icon is not getting displayed. Instead default blue icon is displayed in Nuget.

Here is my .csproj file,

<PropertyGroup>
    <PackageIcon>icon.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
    <None Include="Images\icon.png" Pack="true" PackagePath=""/>
</ItemGroup>

Am I missing anything? please assist.

like image 978
fingers10 Avatar asked Oct 05 '19 13:10

fingers10


People also ask

How do I enable manage NuGet packages in Visual Studio?

To find and install a NuGet package with Visual Studio, follow these steps: Load a project in Solution Explorer, and then select Project > Manage NuGet Packages. The NuGet Package Manager window opens. Select the Browse tab to display packages by popularity from the currently selected source (see Package sources).

How do I manually install a NuGet package?

Open your project or solution in Visual Studio, and select Tools > NuGet Package Manager > Package Manager Console to open the Package Manager Console window. In the console, enter Find-Package with a keyword to find the package you want to install.

How do I install NuGet packages missing?

Right-click the project, select Manage NuGet Packages, and use the NuGet Package Manager to uninstall and reinstall the affected packages. For more information, see Reinstall and update packages.

How do I add a NuGet package to Visual Studio 2010?

The first way is to go to http://nuget.org and click on the Install NuGet button. This will download a Visual Studio 2010 extension package. Once the download is complete, run the package. [Click on image for larger view.]


1 Answers

Currently, displaying the icon by using the <PackageIcon/> or <icon/> property on packages showed on NuGet in Visual Studio is not supported. You can preview your package icon in the upload preview in https://nuget.org

The tracking issue for supporting embedded icons in NuGet for Visual Studio is: https://github.com/NuGet/Home/issues/8189

like image 193
Fernando Aguilar Avatar answered Sep 28 '22 08:09

Fernando Aguilar