Use AttributeFilters with "dotnet dotcover test"

I am trying to use this command and I get an error : 

dotnet dotcover test --dcReportType=HTML --AttributeFilters=System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute

 

Error is : 

MSBUILD : error MSB1001: Unknown switch.
    Full command line: 'C:\Program Files\dotnet\sdk\6.0.308\MSBuild.dll -maxcpucount -verbosity:m -restore -target:VSTest -nodereuse:false -nologo -property:VSTestSetting=C:\Users\FakhrB01\AppData\Local\Temp\Myxepih\Pygoleb.tmp --AttributeFilters=System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute -distributedlogger:Microsoft.DotNet.Tools.MSBuild.MSBuildLogger,C:\Program Files\dotnet\sdk\6.0.308\dotnet.dll*Microsoft.DotNet.Tools.MSBuild.MSBuildForwardingLogger,C:\Program Files\dotnet\sdk\6.0.308\dotnet.dll'
  Switches appended by response files:
Switch: --AttributeFilters=System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute

 

Can anybody help ? 

0
1 comment

I think I found it 

 dotnet dotcover test --dcFilters=-:module=*.Tests --dcReportType=HTML

0

Please sign in to leave a comment.