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
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:
0 commit comments