Skip to content

Commit c1f4826

Browse files
zivkanmeaghanlewis
andauthored
dotnet nuget why has optional project argument (#48885)
* dotnet nuget why has optional project argument * Apply suggestion from @zivkan * Update docs/core/tools/dotnet-nuget-why.md --------- Co-authored-by: Meaghan Osagie (Lewis) <[email protected]>
1 parent 171f14e commit c1f4826

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

docs/core/tools/dotnet-nuget-why.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 05/30/2024
1515
## Synopsis
1616

1717
```dotnetcli
18-
dotnet nuget why <PROJECT|SOLUTION> <PACKAGE> [-f|--framework <FRAMEWORK>]
18+
dotnet nuget why [<PROJECT|SOLUTION>] <PACKAGE> [-f|--framework <FRAMEWORK>]
1919
2020
dotnet nuget why -h|--help
2121
```
@@ -38,7 +38,10 @@ To use the command with projects that can't be restored with the .NET SDK, you c
3838

3939
- **`PROJECT|SOLUTION`**
4040

41-
The project or solution file to operate on. If a directory is specified, the command searches the directory for a project or solution file. If more than one project or solution is found, an error is thrown.
41+
The project or solution file to operate on.
42+
If a directory is specified, the command searches the directory for a project or solution file.
43+
If more than one project or solution is found, an error is thrown.
44+
If no value is provided, the current working directory is used by default.
4245

4346
- **`PACKAGE`**
4447

@@ -54,22 +57,22 @@ To use the command with projects that can't be restored with the .NET SDK, you c
5457

5558
## Examples
5659

57-
- Show the dependency graph for the package "System.Text.Json" for a given solution:
60+
- Show the dependency graph for the package "System.Text.Json":
5861

5962
```dotnetcli
60-
dotnet nuget why .\DotnetNuGetWhyPackage.sln System.Text.Json
63+
dotnet nuget why System.Text.Json
6164
```
6265
6366
![Example: Solution with multiple projects](media/dotnet-nuget-why/dotnet-nuget-why-solution-with-multiple-projects.png)
6467
65-
- Show the dependency graph for the package "System.Text.Json" for a single project:
68+
- Show the dependency graph for the package "System.Text.Json" for a specific project:
6669
6770
```dotnetcli
68-
dotnet nuget why .\DotnetNuGetWhyPackage.csproj System.Text.Json
71+
dotnet nuget why path/to/DotnetNuGetWhyPackage.csproj System.Text.Json
6972
```
7073
7174
- Show the dependency graph for a specific target framework:
7275
7376
```dotnetcli
74-
dotnet nuget why .\DotnetNuGetWhyPackage.csproj System.Text.Json --framework net6.0
77+
dotnet nuget why System.Text.Json --framework net6.0
7578
```

0 commit comments

Comments
 (0)