Skip to content

Commit 5310604

Browse files
authored
Add non-sdk project heading to dotnet nuget why docs (#47589)
1 parent cc2d50a commit 5310604

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ dotnet nuget why -h|--help
2424

2525
The `dotnet nuget why` command shows the dependency graph for a particular package for a given project or solution.
2626

27-
Starting from the .NET 9 SDK, it's possible to pass a NuGet assets file in place of the project file, in order to use the command with projects that can't be restored with the .NET SDK.
28-
First, restore the project in Visual Studio, or `msbuild.exe`.
29-
By default the assets file is in the project's `obj\` directory, but you can find the location with `msbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile`.
30-
Finally, run `dotnet nuget why path\to\project.assets.json SomePackage`.
31-
3227
Starting with version 9.0.200, the command introduces support for runtime identifier (RID) specific packages by generating separate dependency trees for each RID and framework combination.
3328
For example, if a project targets `net9.0` with the `win-x64` RID, the command generates trees for `net9.0/win-x64` and `net9.0`.
3429

30+
### Older project format
31+
32+
To use the command with projects that can't be restored with the .NET SDK, you can pass a NuGet assets file in place of the project file (starting with the .NET 9 SDK):
33+
34+
1. First, restore the project in Visual Studio or using `msbuild.exe`. By default, the assets file is in the project's `obj\` directory, but you can find the location with `msbuild.exe path\to\project.proj -getProperty:ProjectAssetsFile`.
35+
2. Run `dotnet nuget why path\to\project.assets.json SomePackage`.
36+
3537
## Arguments
3638

3739
- **`PROJECT|SOLUTION`**

0 commit comments

Comments
 (0)