New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-contained icons support in the NuGet package manager UI in Visual Studio #8189
Comments
Hi, I'm not getting this to work on Visual Studio 16.5.4 running NuGet 5.5.1.6542. We've added the icon to our packages using the following entries in the *.csproj:
This causes it to show up correctly when opening the package in NuGet Package Explorer (not in the list view however) but Visual Studio still shows the default blue icon. We're publishing to a Azure DevOps Artifacts feed. Am I missing something? Thanks! |
I've the same problem as described by @wouterroos |
Same issue here! |
Still experiencing it. Please, add that feature. |
Using the solution from @wouterroos works for me. Using Visual Studio 2019 v16.6.0 and the NuGet packages is hosted Azure Artifacts (not that I think the location of the NuGet package matters...) |
Just upgraded to Visual Studio v16.6.0 - the only difference I see is that PackagePath is set to "content"... but looking into the nupkg files the icon is set to the right location and the image is included in the nupkg. So I don't think that can be the cause. |
Update - with version 16.7.0 of Visual Studio I can now see the package icon in the installed packages, however it does not display when looking at updates from our remote nexus server. |
@rlordcardano This seems like a Nexus-specific issue. My understanding is that Nexus* needs to be updated to support embedded icons and provide it to the client (as a URL). Otherwise Visual Studio would have to download every single package in the feed in order to extract the icon to display to you. (*) and any other NuGet servers |
It will take a long time for all NuGet servers and clients to catch-up with this feature. For the time being, your best bet is to provide both an embedded icon and an URL icon in the same package as a fallback for any server and client that doesn't yet support the embedded icon. csproj<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageIcon>images\icon.png</PackageIcon>
<PackageIconUrl>https://company.com/icon.png</PackageIconUrl>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="images\icon.png" />
</ItemGroup>
</Project> nuspec<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata minClientVersion="3.3">
<icon>images\icon.png</icon>
<iconUrl>https://company.com/icon.png</iconUrl>
</metadata>
<files>
<file src="..\..\assets\icon.png" target="images\icon.png" />
</files>
</package> |
@GerryWilko Have you tried using a |
@augustoproiete Ahh how frustrating. I was thinking yesterday that may have been the issue but discounted it as Changed to Hopefully this will be useful to anyone else experiencing similar issues. |
@GerryWilko Glad you got to the bottom of it. I reported it as a VS Package Manager bug. |
|
I'm hosting in the |
Same issue for me using VS 2022. Custom NuGet feed is hosted on Azure and no icon is shown. Publishing the same package on nuget.org correctly shows the icon in the VS integrated package manager. |
The issue persists. We're hosting the feed on Nexus and the embedded icon does not show in Visual Studio NuGet Manager. |
Related? #9250 |
Handle icon from both sources:
The PM UI should be able to show packages with both icon types, transparent from the user
The text was updated successfully, but these errors were encountered: