NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.54k stars 643 forks source link

[NuGet.org Bug]: Empty dependencies list for .NET tools #10020

Open scottaddie opened 3 months ago

scottaddie commented 3 months ago

Impact

It's more difficult to complete my work

Describe the bug

When viewing the Dependencies tab for a .NET tool package on nuget.org, no dependencies are listed. For example:

image

This is a lie, since I can navigate to the *.csproj file and clearly see the dependencies. But, I shouldn't have to dive into the source to determine which dependencies exist.

Repro Steps

  1. Navigate to https://www.nuget.org/packages/dotnet-sqlcache
  2. Click the Dependencies tab and notice the message "This package has no dependencies"
  3. Navigate to the source code and notice the 3 dependencies listed

Expected Behavior

The dependencies listed in the *.csproj file should be displayed on the Dependencies tab. In the case of dotnet-sqlcache, I'd expect to see these dependencies listed:

Screenshots

No response

Additional Context and logs

No response

joelverhagen commented 3 months ago

Yes, this is a legitimate issue. The reason this is the case today is that NuGet.org only reads the <dependencies> node in the .nuspec to populate this tab. For tool packages, this metadata does not exist. We would need to either change the tool authoring to add this metadata in a new/existing way or glean dependencies from another artifact inside the package. More details are here in a closed, related issue: https://github.com/NuGet/NuGetGallery/issues/8323#issuecomment-728374870