问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/58248859/nuget-package-icon-not-getting-displayed