Skip to content

Commit 16fb24d

Browse files
authored
Update NuGet Audit pruning feature description (#48317)
1 parent e17cc7b commit 16fb24d

File tree

1 file changed

+4
-1
lines changed
  • docs/core/whats-new/dotnet-10

1 file changed

+4
-1
lines changed

docs/core/whats-new/dotnet-10/sdk.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,12 @@ For more information about native AOT, see [.NET native AOT](../../deploying/nat
172172
173173
## Pruning of framework-provided package references
174174
175-
Starting in .NET 10, the [NuGet Audit](/nuget/concepts/auditing-packages) feature can now [prune framework-provided package references](https://github.com/NuGet/Home/blob/451c27180d14214bca60483caee57f0dc737b8cf/accepted/2024/prune-package-reference.md) that aren't used by the project. This feature is enabled by default for all `net` target frameworks (for example, `net8.0` and `net10.0`) and .NET Standard 2.0 and greater target frameworks. This change helps reduce the number of packages that are restored and analyzed during the build process, which can lead to faster build times and reduced disk space usage. It also can lead to a reduction in false positives from NuGet Audit and other dependency-scanning mechanisms.
175+
Starting in .NET 10, the [NuGet Audit](/nuget/concepts/auditing-packages) feature can [prune framework-provided package references](/nuget/consume-packages/package-references-in-project-files#prunepackagereference) that aren't used by the project.
176+
This feature is enabled by default for all frameworks of a project that targets >= .NET 10.0 in the latest SDK.
177+
This change helps reduce the number of packages that are restored and analyzed during the build process, which can lead to faster build times and reduced disk space usage. It also can lead to a reduction in false positives from NuGet Audit and other dependency-scanning mechanisms.
176178
177179
When this feature is enabled, you might see a reduction in the contents of your applications' generated *.deps.json* files. Any package references supplied by the .NET runtime are automatically removed from the generated dependency file.
180+
When a direct package reference is within the pruning range, [`PrivateAssets="all"` and `IncludeAssets="none"` are applied](/nuget/consume-packages/package-references-in-project-files#how-prunepackagereference-works).
178181
179182
While this feature is enabled by default for the listed TFMs, you can disable it by setting the `RestoreEnablePackagePruning` property to `false` in your project file or *Directory.Build.props* file.
180183

0 commit comments

Comments
 (0)