Skip to content

Commit 2c8810d

Browse files
authored
Update NU1011.md (#3347)
1 parent d9adcad commit 2c8810d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ f1_keywords:
1515
1616
### Issue
1717

18-
`<PackageVersion />` items cannot contain floating versions. NuGet's central package management (CPM) is considered an enterprise-level feature which provides easier version
18+
By default, `<PackageVersion />` items cannot contain floating versions. NuGet's central package management (CPM) is considered an enterprise-level feature which provides easier version
1919
management at scale as well as deterministic and secure restores. The use of floating versions introduces the possibility for a bad package to be introduced into your build
2020
after it has been pushed to a feed. This can lead to a situation where you made no changes in your repository but suddenly something is broken and there is no way for you to
2121
get back into a good state without removing the floating version or pushing a newer version of the package which is fixed. Using non-floating versions means that every upgrade
@@ -30,4 +30,11 @@ commit in your repository.
3030

3131
### Solution
3232

33-
Change the floating version to a [non floating version range](../../concepts/Package-Versioning.md#version-ranges).
33+
It is recommended to change the floating version to a [non floating version range](../../concepts/Package-Versioning.md#version-ranges). If that is not possible, you can enable
34+
floating versions with CPM by setting an MSBuild property:
35+
36+
```xml
37+
<PropertyGroup>
38+
<CentralPackageFloatingVersionsEnabled>true</CentralPackageFloatingVersionsEnabled>
39+
</PropertyGroup>
40+
```

0 commit comments

Comments
 (0)