Skip to content

Add dotnet nuget why documentation #30497

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

Closed
wants to merge 1 commit into from

Conversation

pragnya17
Copy link
Contributor

Summary

Add documentation for dotnet nuget why. The implementation of this command is still in progress: NuGet/Home#11782.

@@ -0,0 +1,78 @@
---
title: dotnet nuget why command
description: The 'dotnet nuget why' command provides the user to view the dependency graph of a package.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: The 'dotnet nuget why' command provides the user to view the dependency graph of a package.
description: The 'dotnet nuget why' command shows the dependency graph of a package.


- **`--framework <FRAMEWORK>`**

The NuGet sources to use when searching for newer packages. Requires the `--outdated` option.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --outdated option isn't in the doc here.


## Description

The `dotnet list package` command provides a way to print out the dependency graph for a package to allow users to understand the nature of top-level packages and their transitive dependencies. This command is dependent on the `project.assets.json` file being present in the project. The following example shows the output of the `dotnet nuget why` command for `packageA` which has dependencies in `projectNameA` and `projectNameB`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be easier to understand with actual command output using real package/project names rather than packageA and B and projectA and B.

---
# dotnet nuget why

**This article applies to:** ✔️ .NET Core 3.1 SDK and later versions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which preview is this in? We will want to make sure it doesn't get merged before it's available, and this applies-to text should be updated to .NET 7 Preview SDK.

dotnet nuget why packageA --framework net6.0
```

- Print dependency graph of `packageA`, the package has dependencies in multiple projects so all dependencies are printed by default:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Print dependency graph of `packageA`, the package has dependencies in multiple projects so all dependencies are printed by default:
- Print dependency graph of `packageA`. The package has dependencies in multiple projects so all dependencies are printed by default:

But the command only looks at one project per the arguments section, so it's not clear what this means by referring to multiple projects.


## Description

The `dotnet list package` command provides a way to print out the dependency graph for a package to allow users to understand the nature of top-level packages and their transitive dependencies. This command is dependent on the `project.assets.json` file being present in the project. The following example shows the output of the `dotnet nuget why` command for `packageA` which has dependencies in `projectNameA` and `projectNameB`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `dotnet list package` command provides a way to print out the dependency graph for a package to allow users to understand the nature of top-level packages and their transitive dependencies. This command is dependent on the `project.assets.json` file being present in the project. The following example shows the output of the `dotnet nuget why` command for `packageA` which has dependencies in `projectNameA` and `projectNameB`:
The `dotnet nuget why` command provides a way to print out the dependency graph for a package to allow users to understand the nature of top-level packages and their transitive dependencies. This command is dependent on the `project.assets.json` file being present in the project. The following example shows the output of the `dotnet nuget why` command for `packageA` which has dependencies in `projectNameA` and `projectNameB`:

Copy link
Contributor

@tdykstra tdykstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting on responses to earlier review comments.

@BillWagner
Copy link
Member

Hi @pragnya17

Can you address the comments on this PR? Once you do that, we can merge it.

@tdykstra
Copy link
Contributor

tdykstra commented Dec 1, 2022

Closing due to no response from PR author.

@tdykstra tdykstra closed this Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants