Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following PackageReference items cannot specify a value for VersionOverride: PackageName. Projects using Central Package Management are currently configured to disable this functionality.
Issue
A project is configured to use NuGet Central Package Management and a <PackageReference />
item is defined which specifies a value for the VersionOverride
attribute but this functionality has been disabled:
<PropertyGroup>
<CentralPackageVersionOverrideEnabled>false</CentralPackageVersionOverrideEnabled>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="PackageName" VersionOverride="9.0.0" />
</ItemGroup>
Solution
- Remove the
VersionOverride
attribute from the<PackageReference />
item:
<ItemGroup>
<PackageReference Include="PackageName" />
</ItemGroup>
- You can configure Central Package Management to allow or disallow
VersionOverride
with the MSBuild propertyCentralPackageVersionOverrideEnabled
. See Overriding Package Versions for more information.