Proj0047: Label item groups that disable compilation items
There are use cases where a build item should not be treated as a compilation item.
However, to prevent this from happening unintentionally (drag and drop in Visual
Studio can result to this), the <ItemGroup>
containing a
` should be labeled with a description.
Non-compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Templates/*.cs" />
</ItemGroup>
</Project>
Compliant
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
</PropertyGroup>
<ItemGroup Label="Code templates">
<Compile Remove="Templates/*.cs" />
</ItemGroup>
</Project>