Skip to content

“Browse” tab can’t show the embedded icon of the package from DevOps private feeds #9250

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

Open
v-luzh opened this issue Mar 3, 2020 · 34 comments
Assignees
Labels

Comments

@v-luzh
Copy link

v-luzh commented Mar 3, 2020

Details about Problem

NuGet version: NuGet Client Dev\5.6.0.6479
VS Version: Master\29902.138
OS: Windows-10-Enterprise-RS5

Detailed repro steps

  1. Create a Console App (.NET Core 3.1) in VS and open the PM UI of the solution.
  2. Add the DevOps feed into the Settings->NuGet Package Manager->Package Sources.
  3. Select the new added DevOps feed in the Package source dropdown box in the PM UI and install the package [classlib.net48 -version 1.0.5 (don’t have the backlash problem in bug 9225), dotnet.icon -version 1.0.0 (embedded icon)]
  4. Check all the tabs in PM UI.

Expected

The embedded icon should show correctly in all the tabs of PM UI.

Actual

Only “Browse” tab can’t show the embedded icon of the package from DevOps feed as below screenshot.
image

Note

It doesn't repro for the nuget.org feed.

@dominoFire
Copy link
Contributor

@karann-msft @jmyersmsft

@jmyersmsft
Copy link

jmyersmsft commented Mar 3, 2020

Azure Artifacts does not yet support extracting embedded icons to re-host them, so it has no icon to provide to VS. For already-installed packages, NuGet is pulling the icon from the .nupkg that it already has on disk.

This is near the top of our (Azure Artifacts's) backlog, but I can't give any more concrete information about timeline.

To be clear, this is an Azure Artifacts problem, not a NuGet problem.
Also, this doesn't affect the content of the packages in any way, just what we return in search results.

@zivkan zivkan added the Resolution:External This issue appears to be External to nuget label Mar 4, 2020
@zivkan
Copy link
Member

zivkan commented Mar 4, 2020

Closing as per the comment above. NuGet added a new feature and Azure Artifacts hasn't yet implemented it.

@zivkan zivkan closed this as completed Mar 4, 2020
@dominoFire
Copy link
Contributor

I will use this issue as an Epic to track all efforts to enable this scenario in NuGet PM UI and Azure DevOps

@donnie-msft
Copy link
Contributor

Closed as Duplicate a VS Feedback ticket around this issue (1114782)

@aortiz-msft aortiz-msft removed the Resolution:External This issue appears to be External to nuget label May 29, 2020
@v-luzh v-luzh changed the title [Test Failure] Only “Browse” tab can’t show the embedded icon of the package from DevOps feed [Test Failure] “Browse” tab can’t show the embedded icon of the package from DevOps feed May 29, 2020
@AroglDarthu
Copy link

Just want to mention that this issue also happens on the "Updates" and "Consolidate" tabs.

@rrelyea
Copy link
Contributor

rrelyea commented Nov 11, 2020

putting on my plate right now...as I am doing work in this area.

@rrelyea rrelyea added this to the Sprint 179 - 2020.11.09 milestone Nov 11, 2020
@rrelyea
Copy link
Contributor

rrelyea commented Feb 1, 2021

fixed in dev build 7084, which isn't inserted into P4 yet...but we hope to this week.

@rrelyea rrelyea closed this as completed Feb 1, 2021
@v-luzh
Copy link
Author

v-luzh commented Mar 2, 2021

Reactivate this bug since it still repro on Main\31101.164 + NuGet Client Dev\5.10.0.7152. Please help to check if the fix is merged to dev branch? Thanks.

@v-luzh v-luzh reopened this Mar 2, 2021
@StefanOverHaevgRZ
Copy link

Probably no update?

@TheRealAyCe
Copy link

It works when your package only has an iconUrl.
The main problem here is that it forces you to use iconUrl only. It would be fine if it would default to using the iconUrl when both it and icon are available. But as soon as you use both (which is the recommended thing to do it seems?), it ignores iconUrl and no longer shows an actual icon.

    <icon>nugeticon.png</icon>
    <iconUrl>some icon url address</iconUrl>

doesn't work in the feed search (but does, once installed).

    <iconUrl>some icon url address</iconUrl>

does work in the feed search and once installed, but is no longer recommended.

Please just make it use iconUrl if available, until you've implemented re-hosting of package internal icons. You're already doing that if icon is not set!

@v-luzh v-luzh changed the title [Test Failure] “Browse” tab can’t show the embedded icon of the package from DevOps private feeds “Browse” tab can’t show the embedded icon of the package from DevOps private feeds Jul 13, 2023
@michael-hawker
Copy link

Think we've been hitting this as well, really hard to know. Also makes it impossible to validate packages have the proper icon setup on our private feed before we publish...

@jimSampica
Copy link

Intra-organization packages would be much more identifiable with this fixed.

@donnie-msft donnie-msft self-assigned this Oct 2, 2023
@donnie-msft
Copy link
Contributor

Going to take a look this Sprint to see if I can articulate the problem with this icon binding.

@donnie-msft donnie-msft added the Category:Quality Week Issues that should be considered for quality week label Nov 6, 2023
@DaleyKD
Copy link

DaleyKD commented Nov 21, 2023

@donnie-msft : Any update?

I know this seems like a silly thing we're requesting, but it sure would be nice for Azure Artifacts to support standard nuspec stuff.

Thanks!

@Nexusmeister
Copy link

Intra-organization packages would be much more identifiable with this fixed.

This is a problem that we are facing like every day. It is a little "bug" but it annoys while validating the correct package

@donnie-msft
Copy link
Contributor

@donnie-msft : Any update?

I know this seems like a silly thing we're requesting, but it sure would be nice for Azure Artifacts to support standard nuspec stuff.

Thanks!

Not yet, I ended up having to move it to November Sprint, and Quality Week will be next week which is when I'll look into this task.
Thanks for your patience!

@DaleyKD
Copy link

DaleyKD commented Nov 21, 2023

I appreciate that. I'm glad to hear that ADO isn't forgotten. There are many times it feels like it is, especially with buggy Build Tasks.

@donnie-msft
Copy link
Contributor

donnie-msft commented Nov 27, 2023

I've found that there's a few ways to encounter this problem. Out of curiosity, how many of you are seeing this with an Azure DevOps feed with upstream package sources?

@DaleyKD
Copy link

DaleyKD commented Nov 28, 2023

We do, but I don't know why:
image

@donnie-msft
Copy link
Contributor

Providing an update on what I've found and a rough draft of my notes:

My rough draft proposal would be:

  • Plumb in an HttpSource / SourceRepository that has a resource which can make authenticated HTTP calls.
  • Look in GPF/fallback folders for icons first (reduce need for HTTP calls when the machine already has the icon)

Questions/concerns:

AzDo package sources with Upstreaming: I'm not yet clear if the authenticated HTTP call would cause AzDo to save packages to the feed when Browse tab makes authenticated requests for icons. My guess is that it would save those packages (as it does that when installing a package that exists on an upstream). Questions to be understood are 1. is that a problematic side effect for those feeds and 2. does it have performance implications on Client that need more design work.

@jmyersmsft
Copy link

Current implementation in Azure Artifacts is to return a 404 when asked to extract an icon from a package from upstream that hasn't been saved to the feed.

That could possibly be changed in the future to do something like forward the request on to the upstream, but that's nontrivial for us. We pull nuspecs from PackageBaseAddress to get metadata rather than the registrations API, so we don't have the upstream's IconUrl at hand.

@smkanadl
Copy link

smkanadl commented Dec 4, 2023

I never use upstream sources. Since a nuget.config file with package source mapping makes it quite easy to setup multiple packages sources, I will not need package icons from upstream sources at all.

@donnie-msft donnie-msft removed the Category:Quality Week Issues that should be considered for quality week label Dec 4, 2023
@felipementel
Copy link

I'm preparing material to create a video on my YouTube channel, and I came across exactly this problem.

I am unable to place an icon for my package, published in Azure DevOps Artifacts.

I've tried using different tags in csproj, different file formats, but nothing works.

I will leave my example of how I am publishing the package, using YAML Pipelines

name: $(BuildDefinitionName)_$(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

trigger:
   branches:
     include:
     -main
     - feature/*

pool:
   vmImage: ubuntu-latest

steps:

- task: UseDotNet@2
   inputs:
     packageType: 'sdk'
     version: '8.0.x'

- task: DotNetCoreCLI@2
   displayName: Restore
   inputs:
     command: 'custom'
     projects: '**/*.csproj'
     custom: 'restore'

- task: DotNetCoreCLI@2
   displayName: Build
   inputs:
     command: 'custom'
     projects: '**/*.csproj'
     custom: 'build'
     arguments: '--no-restore'

- task: DotNetCoreCLI@2
   displayName: Pack
   inputs:
     command: 'pack'
     packagesToPack: '**/*.csproj'
     versioningScheme: 'off'

- task: NuGetCommand@2
   displayName: 'NuGet push'
   inputs:
     command: push
     packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
     publishVstsFeed: 'felipementel-packages'
     nuGetFeedType: 'internal'
     noCache: true
     allowPackageConflicts: true

and this is my csproj (without any icon references, as no tag worked)

<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.8</Version>
<VersionSuffix>-alpha-1.0</VersionSuffix>
<Authors>Felipe P Augusto</Authors>
<Company>DEPLOY</Company>
<PackageTags>Microsoft .NET;Channel DEPLOY</PackageTags>
<Description>Example API and documentation too
It may contain a link, such as this example https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/README.md and https://github. com/Azure/azure-sdk-for-net/blob/master/sdk/storage/Azure.Storage.Blobs/CHANGELOG.md</Description>
<RepositoryType>git</RepositoryType>
</PropertyGroup>


<ItemGroup>
<Content Include="FileAttachment.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<PackageCopyToOutput>true</PackageCopyToOutput>
<pack>true</pack>
</Content>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="AttachmentFile.txt" />
</ItemGroup>

</Project>

image

if anyone can help.

@TheRealAyCe
Copy link

@felipementel I don't think it's possible to display a custom icon in that menu at all.

@donnie-msft donnie-msft added the Category:Quality Week Issues that should be considered for quality week label Apr 1, 2024
@LockTar
Copy link

LockTar commented Apr 10, 2024

Hammer seems I'm not the only one with this problem. Hopefully this will be fixed ASAP

@v-luzh
Copy link
Author

v-luzh commented Aug 23, 2024

It still reproes on VS Main\35222.175 with implicit NuGet Client Dev\6.12.0.82.

@donnie-msft
Copy link
Contributor

donnie-msft commented Sep 4, 2024

Providing a status update & plan outline:

  1. ➡️[PR in review (see screenshot)] Read icon from GPF when the icon is on the machine locally already (partial improvement): Attempt Loading package Icon from local folders to avoid accessing remote feeds for metadata by donnie-msft · Pull Request #6009 · NuGet/NuGet.Client (github.com)
  2. 🚧[On plate for September 2024] Show broken icon status indicator when the icon still isn't available PM UI Icon Status could be indicated with an Overlay on Default Icon · Issue #10122 · NuGet/Home (github.com)
  3. 💡[Needs design discussion] Hypothesis/trial needed: see if authenticating icon requests helps in any scenario to actually retrieve an icon remotely.
  4. Work with AzDo to determine if any changes can be made to improve how clients access icon from upstream sources.

Sample of improvement for PR in point # 1:
image

@zivkan
Copy link
Member

zivkan commented Apr 28, 2025

related:

Now that PM UI can show readmes, it can't get the readmes from private feeds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests