I have a .Net Core application which has got one .Net Standard 2.1 project in it. I am using Coverlet to get the code coverage in Cobertura format.
I am using "coverlet.msbuild" nuget package in all my Test projects.
I want to add [ExcludeFromCodeCoverage] attribute at a assembly-level so that coverlet ignores this project while performing the analysis.
I cannot find AssemblyInfo.cs file in .Net Core / .Net Standard projects.
I tried adding below tag in the proejct's .csproj file
<ItemGroup>
<AssemblyAttribute Include="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" />
</ItemGroup>
but still no luck.
The only workaround for me is to add [ExcludeFromCodeCoverage] attribute manually in all the class files which is not a best way.