.NET project file analyzers community

Proj0806: VersionOverride should change the version

When Central Package Management is enabled, the use of VersionOverride on a <PackageReference> only is useful when it defines a different version then already defined by the CPM. In that case, the VersionOverride should be removed.

Non-compliant

<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
    <PackageReference Include="Qowaiv" VersionOverride="7.0.4" />
  </ItemGroup>

</Project>

Compliant

<Project Sdk="Microsoft.NET.Sdk">

  <ItemGroup>
    <PackageReference Include="Qowaiv" />
  </ItemGroup>

</Project>