Proj0046: Update statements should change state
In a MSBuild file, <ItemGroup>
items can be updated using the @Update
attribute. This rule checks if the update changes the state of the item by
defining another attribute or child elements.
Non-compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Qowaiv" />
</ItemGroup>
</Project>
Compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Qowaiv" Version="8.4.3" />
</ItemGroup>
</Project>