When all assets are private, none of them will be included. Due to that, there
is not really a point in specifying the IncludeAssets
.
More about controlling dependency assets can be read here.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup Label="Non-compliant">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime;build</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" PrivateAssets="All" IncludeAssets="runtime;build;native; contentfiles;analyzers;buildtransitive" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup Label="Non-compliant">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="NUnit.Analyzers" Version="4.3.0" PrivateAssets="All" />
</ItemGroup>
</Project>