Skip to content
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

Dotnet Tools don't show Framework Dependencies #8323

Closed
RickStrahl opened this issue Nov 12, 2020 · 4 comments
Closed

Dotnet Tools don't show Framework Dependencies #8323

RickStrahl opened this issue Nov 12, 2020 · 4 comments
Labels
Area: Gallery UI feature-request Customer feature request

Comments

@RickStrahl
Copy link

Dotnet Tools don't show Framework Dependencies

Dotnet tools published to the NuGet site do not show a framework dependency in the online listing.

This is a problem if a package fails to install due a missing framework and the user needs to find a version that works - there's no way to find a version that might have a lower framework dependency.

Example:

image

If I get an error message upon install like this:

image

I can't even look for an older version (in this case the previous version) that runs on an older framework (3.1 in 0.2.16) because that info isn't displayed.

Solution

Show the .NET Core Target Framework dependency. It's odd that this isn't shown since non-tool packages shows the framework target information.

@joelverhagen
Copy link
Member

In general showing package compatibility is a weak spot for NuGet.org and NuGet tooling in general. The dependencies section for non-tool packages has served as an approximation for compatibility for quite some time.

In general the dependency groups of a package and the frameworks it supports overlap so it's not a bad approximation. There are gaps however such as packages that don't have dependencies or packages that are packed using non-traditional means (causing dependency groups to not align with compatibility for whatever reason).

For the case with .NET tools, dependencies are not reported in the package .nuspec therefore this metadata does not appear on the nuget.org page. In fact, the dependencies are bundled into the package in a format that is not currently understood by nuget.org.

That being said, I totally agree that this is a bad experience and we should consider it for our future efforts in making package compatibility more visible to our users (/cc @JonDouglas).

@RickStrahl
Copy link
Author

I'm confused... Isn't all that information available in the NuGet package:

image

Why should this be any different than a non-tool package? I'm not even asking for a full dependency graph, but the top level runtime dependency in this case is useful. Non-tool packages display that just fine:

image

For the runtime at least there would not appear to be any ambiguities unless I'm missing something here...

@joelverhagen
Copy link
Member

The Dependencies section on nuget.org is populated by the <dependencies> section in the .nuspec. For .NET tool packages, this section is does not exist. The reason for this is specific to how .NET tool packages are packages and deployed, but suffice it to say that the shape of the package and contained metadata is significantly different than normal dependency packages.

Compare in .nuspec or NuGet Package Explore view for these two packages:

LiveReloadServer

image

(no <dependencies> section in the .nuspec)

Westwind.AspnetCore.LiveReload

image

There are dependencies in the .nuspec:

    <dependencies>
      <group targetFramework=".NETCoreApp3.1" />
      <group targetFramework="net5.0" />
    </dependencies>

Now, it's definitely not true that we can't surface the information. You've screenshotted it and it exists 👍. It's just that we aren't doing it today. I'm trying to describe the current state. Sorry if I was confusing.

There is work in progress to improve how package compatibility information is surfaced. Jon Douglas, mentioned before, is working on the design of that effort.

This issue brings up a very good point though. We need to consider compatibility for both traditional dependency packages as well as .NET tool packages.

@skofman1 skofman1 added Area: Gallery UI feature-request Customer feature request labels Jan 8, 2021
@joelverhagen
Copy link
Member

This is resolved now with the Frameworks tab.
image

The dependencies still do not show but this is tracked by a different item.
#10020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Gallery UI feature-request Customer feature request
Projects
None yet
Development

No branches or pull requests

3 participants