Open v-luzh opened 4 years ago
@karann-msft @jmyersmsft
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.
Closing as per the comment above. NuGet added a new feature and Azure Artifacts hasn't yet implemented it.
I will use this issue as an Epic to track all efforts to enable this scenario in NuGet PM UI and Azure DevOps
Closed as Duplicate a VS Feedback ticket around this issue (1114782)
Just want to mention that this issue also happens on the "Updates" and "Consolidate" tabs.
putting on my plate right now...as I am doing work in this area.
fixed in dev build 7084, which isn't inserted into P4 yet...but we hope to this week.
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.
yes, was mistakenly closed. i fixed embedded icons...but doesn't yet work with authenticated feeds. More work to do that..
Any updates on this? It still doesn't work even with a valid .nuspec file
Are there any updates on this problem?
Also looking forward to this!
Probably no update?
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!
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...
Intra-organization packages would be much more identifiable with this fixed.
Going to take a look this Sprint to see if I can articulate the problem with this icon binding.
@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!
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 : 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!
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.
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?
We do, but I don't know why:
Providing an update on what I've found and a rough draft of my notes:
My rough draft proposal would be:
HttpSource
/ SourceRepository
that has a resource which can make authenticated HTTP calls.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.
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.
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.
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>
if anyone can help.
@felipementel I don't think it's possible to display a custom icon in that menu at all.
Hammer seems I'm not the only one with this problem. Hopefully this will be fixed ASAP
It still reproes on VS Main\35222.175 with implicit NuGet Client Dev\6.12.0.82.
Providing a status update & plan outline:
Sample of improvement for PR in point # 1:
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
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.
Note
It doesn't repro for the nuget.org feed.