Description
As part of NuGet/NuGet.Client#5440 we'll be allowing users to enable floating versions with central package management (CPM). We'll need to update the documentation for the NU1011 error to explain how to enable the functionality since it will remain off by default.
Proposed wording:
Solution
NuGet recommends not using floating versions with central package management and instead encourages users change the floating versions to a non floating version range.
If changing to non floating versions is not possible, users can enable the functionality by setting the MSBuild property CentralPackageFloatingVersionsEnabled
to true
in an individual project or a common import like Directory.Build.props:
<PropertyGroup>
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
</PropertyGroup>
NOTE: The use of floating versions can introduce non-deterministic NuGet restores as described above and is not recommended.