Rider ignores my .runsettings file CodeCoverage exclude filters


Hello, I'm having a problem with Rider and DotCover. 

I have a .runsettings file which has a <codecoverage> element with some exclude filter elements for code coverage in it. I added my .runsettings file path to the ‘Use specific .runsettings/.testsettings settings file:’ config in ‘Build, Execution, Deployment> Unit Testing> Test Runner’.

But when i run my unit tests and get coverage from DotCover, my .runsettings file seems to be ignored because my code coverage exclude filter configs won't load from my .runsettings file and i won't get 100% coverage. 

I tested my .runsettings file before in VS Code and it works just fine.

I'm using XUnit for Unit Testing btw.

1 comment

Hello M Mirzaei,

The CodeCoverage section in the runsettings file is made by Microsoft for built-in VS Code Coverage feature. 

dotCover has separate coverage filters at ReSharper | Options | dotCover | Filtering. These filters are written to .DotSettings file depending on the layer and can then be shared across the team by including in a VCS. 

I have also created a feature request to support runsettings code coverage filters out of the box DCVR-12517


Please sign in to leave a comment.