Comments (9)
Yeah, the Azure Artifacts team doesn't care. They have only exposed the image in the Azure Artefacts feed if it is contained in the PackageIconUrl
field.
So, Microsoft recommends deprecating the PackageIconUrl
property in favor of the PackageIcon
field and using an embedded image in the NuGet package, but this is completely unsupported by Azure DevOps. So if you try to embed the icon in the NuGet package in the recommended way, you'll only ever see the default NuGet image in both Visual Studio and the DevOps Azure Artifact list.
Your option is either ignore the recommendation and continue to use the PackageIconUrl
field, or move to PackageIcon
and host your package somewhere other than Azure Artifacts.
There have been issues created for this going back 4 years, but apparently agreeing to and then implementing a spec is too much for teams within the Microsoft organization to accomplish.
Tough for us customers, I guess!
from samples.
Seems to be fixed, because now I can see those icons.
from samples.
Interesting, I'll check this out today and see!
from samples.
@maslewandowski Can you share your package project file? I've just switched over a package from PackageIconUrl
to PackageIcon
and it's definitely not showing the image in DevOps or in VS, despite the image being bundled into the NuGet package. Thanks 👍
from samples.
<Project>
<PropertyGroup>
<PackageIcon>icon.jpeg</PackageIcon>
</PropertyGroup>
<ItemGroup>
<None Include="icon.jpeg" Pack="true" Visible="false" PackagePath=""/>
</ItemGroup>
</Project>
hope it helps
from samples.
This is exactly what I have in my NuGet config, it definitely is not showing the package icon in Visual Studio or on the DevOps artifact feed.
from samples.
Is there a sample project? Seemed to work for me, here's my project https://github.com/WeihanLi/nocker and the NuGet package https://www.nuget.org/packages/nocker
from samples.
I appreciate the help, but that's being hosted on NuGet and not via Azure Artifacts, which is what this issue is about.
I've just dug into my Azure Artifacts feed, it looks like the iconUrl
is being returned in the feeds now.
Feed example:
https://pkgs.dev.azure.com/{teamName}/_packaging/{feedId}/nuget/v3/query2/?prerelease=true&semVerLevel=2.0.0
returns my feed:
{
"@context": {
"@vocab": "http://schema.nuget.org/schema#",
"comment": "http://www.w3.org/2000/01/rdf-schema#comment",
"label": "http://www.w3.org/2000/01/rdf-schema#label"
},
"data": [
{
"@id": "",
"@type": "Package",
"id": "TestPackage",
"version": "7.0.0-beta.1",
"description": "Package description.",
"versions": [
{
"@id": "TestPackage",
"downloads": 0,
"version": "7.0.0-beta.1"
}
],
"authors": [
"authorName"
],
"iconUrl": "https://pkgs.dev.azure.com/{teamName}/_packaging/{feedId}/nuget/v3/flat2/testpackage/7.0.0-beta.1/testpackage.7.0.0-beta.1.nupkg?extract=Icon.png",
"licenseUrl": "",
"projectUrl": "https://{teamName}@dev.azure.com/{teamName}/{feedName}/_git/TestPackage",
"registration": "",
"summary": null,
"tags": null,
"title": null
}
]
}
So it looks like the icon has indeed been added to the DevOps NuGet feed. However, when viewing the iconUrl
above, I get the following error:
{
"$id": "1",
"innerException": null,
"message": "TF400813: The user 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' is not authorized to access this resource.",
"typeName": "Microsoft.TeamFoundation.Framework.Server.UnauthorizedRequestException, Microsoft.TeamFoundation.Framework.Server",
"typeKey": "UnauthorizedRequestException",
"errorCode": 0,
"eventId": 3000
}
Seems that there is some kind of permission issue. I'll keep digging.
from samples.
VS2022 issues seems to be authorization based - have reported to the VS team at https://developercommunity.visualstudio.com/t/post/10433567.
I assume that the DevOps frontend is similar. @maslewandowski could you prove a screenshot showing custom icons in your private feed on DevOps?
from samples.
Related Issues (19)
- Fails to Copy Satellite Assemblies HOT 2
- No (non-framework) satelitte references added to Project for Nuget 2.8.3
- Provide a sample to demonstrate custom credential provider
- Sample depends on wrong version of https://www.nuget.org/packages/ClassLibrary/1.0.0/ HOT 2
- Is this only for UWP? What about WPF or Xamarin Forms? HOT 1
- Copyrights? HOT 1
- Linked assemblies should not be copied to output directory HOT 5
- Invalid XML in NativePackage .targets files in ExtensionSDKasNuGetPackage Sample HOT 7
- WinRT information: Class not registered HOT 1
- Is there a content-file sample that base on .netstandard project HOT 1
- ContentFilesExample problems HOT 1
- Querying most downloaded packages from nuget.org HOT 1
- The Target element tag is not closed HOT 1
- Are the NuGet libraries worth using? HOT 8
- How do you run CatalogReaderExample.dll from a command prompt, outside Visual Studio? HOT 3
- How to add extern alias for three same namspace assemblies HOT 6
- Can't correctly embed interop types for packagereference HOT 2
- Does nuget support enabling CPM for a subset of folders? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from samples.