You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| NuGetAuditMode |all|`direct` and `all`| If you'd like to audit top-level dependencies only, you can set the value to `direct`. NuGetAuditMode is not applicable for packages.config projects. |
46
+
| NuGetAuditMode |direct|`direct` and `all`| If you'd like to audit top-level dependencies only, you can set the value to `direct`. NuGetAuditMode is not applicable for packages.config projects. |
47
47
| NuGetAuditLevel | low |`low`, `moderate`, `high`, and `critical`| The minimum severity level to report. If you'd like to see `moderate`, `high`, and `critical` advisories (exclude `low`), set the value to `moderate`|
48
48
| NuGetAudit | true |`true` and `false`| If you wish to not receive security audit reports, you can opt-out of the experience entirely by setting the value to `false`|
49
49
50
-
Note: In .NET 8, the default value of NuGetAuditMode is `direct`.
51
-
Therefore, setting [SdkAnalysisLevel](/dotnet/core/project-sdk/msbuild-props#sdkanalysislevel) to `8.0.400` changes the default value of NuGetAuditMode accordingly.
52
-
53
50
#### Audit Sources
54
51
55
52
Restore downloads a server's [`VulnerabilityInfo` resource](../api/vulnerability-info.md) to check against the list of packages each project is using.
Copy file name to clipboardExpand all lines: docs/reference/errors-and-warnings/NU1604.md
+49-1Lines changed: 49 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,10 +12,51 @@ f1_keywords:
12
12
13
13
# NuGet Warning NU1604
14
14
15
+
## Missing Package Version
16
+
17
+
> Project dependency 'PackageA' does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
18
+
19
+
### Issue
20
+
21
+
A project dependency doesn't define a version.
22
+
23
+
This means that restore used the lowest available version.
24
+
Each restore will float downwards trying to find a lower version that can be used.
25
+
This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.
26
+
27
+
### Solution
28
+
29
+
Find the `PackageReference` item that does not define the `Version` attribute and add it:
If the project is using [NuGet's Central Package Management (CPM)](../../consume-packages/Central-Package-Management.md), you need to update the `<PackageVersion />` item in `Directory.Packages.props` and change from:
If a version is specified in a `<PackageVersion />` item and you still receive this warning, verify you've correctly [onboarded to central package management](../../consume-packages/Central-Package-Management.md#enabling-central-package-management).
47
+
48
+
> [!Note]
49
+
> When using CPM and the file `Directory.Packages.props` is invalid, NU1604 is raised.
50
+
51
+
## Missing Inclusive Lower Bound
52
+
15
53
> Project dependency 'PackageA' (<= 9.0.0) does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
16
54
17
55
### Issue
18
-
A project dependency doesn't define a lower bound.<br/><br/>This means that restore did not find the *best match*. Each restore will float downwards trying to find a lower version that can be used. This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.
56
+
A project dependency doesn't define a lower bound.
57
+
58
+
This means that restore did not find the *best match*. Each restore will float downwards trying to find a lower version that can be used.
59
+
This means that restore goes online to check all sources each time instead of using the packages that already exist in the user package folder.
19
60
20
61
### Solution
21
62
Update the project's `PackageReference``Version` attribute to include a lower bound.
@@ -32,3 +73,10 @@ or
32
73
> `<PackageReference Version="9.0.0" />`
33
74
34
75
which implies a lower bound.
76
+
77
+
If the project is using [NuGet's Central Package Management (CPM)](../../consume-packages/Central-Package-Management.md), you need to update the `<PackageVersion />` item in `Directory.Packages.props` and change from:
Copy file name to clipboardExpand all lines: docs/release-notes/NuGet-6.12.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ ms.topic: conceptual
7
7
8
8
# NuGet 6.12 Release Notes
9
9
10
+
> [!NOTE]
11
+
> In response to developers' feedback to ensure builds continuity when updating to .NET SDK 9, we have reverted the default value of NuGetAuditMode to `direct` in Visual Studio 17.12.3 and .NET 9.0.101.
12
+
10
13
NuGet distribution vehicles:
11
14
12
15
| NuGet version | Available in Visual Studio version | Available in .NET SDK(s) |
0 commit comments