How to correct dotnet restore warning NU1604, does not contain an inclusive lower bound?

In order to indicate a minimum version for your package references you have to set the Version property of your reference to a range that contains an inclusive lower bound. As @Carter pointed out, Microsoft provides a nice documentation about the format of that property.

If you don't specify an inclusive lower bound for your references, each restore will try to find a lower version of the package that can be used. More information about that warning can be found on the nuget errors and warnings reference page

The only problem with your reference seems to be that you have a typo (Verison instead of Version). So the line should be

<PackageReference Include="System.Net.NameResolution" Version="4.3.0" />

With this line, you indicate that the project requires the version 4.3.0 or above of the package System.Net.NameResolution, hence the inclusive lower bound on 4.3.0.


I think the key there is to not include the last digit on your version. Then it will set the lowerbound as 4.3.0 by default.

<PackageReference Include="System.Net.NameResolution" Version="4.3" />

Right click "Packages" -> Manage NuGet Packages -> Update

Update all broken packages, if that is not available remove them and add them again.

Tags:

.Net Core