Skip to content

Commit 448ecde

Browse files
authored
Merge pull request #3365 from NuGet/main
Publish main to live
2 parents 96764b2 + 0d3df96 commit 448ecde

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed

docs/concepts/Auditing-Packages.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,10 @@ We recommend that audit is configured at a repository level.
4343

4444
| MSBuild Property | Default | Possible values | Notes |
4545
|------------------|---------|-----------------|-------|
46-
| 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. |
4747
| 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` |
4848
| 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` |
4949

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-
5350
#### Audit Sources
5451

5552
Restore downloads a server's [`VulnerabilityInfo` resource](../api/vulnerability-info.md) to check against the list of packages each project is using.

docs/reference/errors-and-warnings/NU1604.md

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,51 @@ f1_keywords:
1212

1313
# NuGet Warning NU1604
1414

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:
30+
31+
For example change from:
32+
33+
> `<PackageReference Include="PackageA" />`
34+
35+
to:
36+
37+
> `<PackageReference Include="PackageA" Version="9.0.0" />`
38+
39+
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:
40+
41+
> `<PackageVersion Include="PackageA" />`
42+
43+
to:
44+
> `<PackageVersion Include="PackageA" Version="9.0.0" />`
45+
46+
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+
1553
> Project dependency 'PackageA' (&lt;= 9.0.0) does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results.
1654
1755
### 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.
1960

2061
### Solution
2162
Update the project's `PackageReference` `Version` attribute to include a lower bound.
@@ -32,3 +73,10 @@ or
3273
> `<PackageReference Version="9.0.0" />`
3374
3475
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:
78+
79+
> `<PackageVersion Include="PackageA" Version="(9.0.0, )" />`
80+
81+
to:
82+
> `<PackageVersion Include="PackageA" Version="9.0.0" />`

docs/release-notes/NuGet-6.12.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ ms.topic: conceptual
77

88
# NuGet 6.12 Release Notes
99

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+
1013
NuGet distribution vehicles:
1114

1215
| NuGet version | Available in Visual Studio version | Available in .NET SDK(s) |

0 commit comments

Comments
 (0)