When creating coverage reports using OpenCover (and then generating an HTML report using ReportGenerator) for the MSTest package, I try to exclude classes generated by the generated frames. In particular, classes created in the project namespace using a service reference.
The command I use to generate the XML files looks like this:
OpenCover.Console.exe -register:user "-target:MyProject.Tests.dll" -targetargs:"/testcontainer:MyContainer" -output:coverage.xml -mergebyhash -filter:-*.AWebService.*
I also tried excluding by file:
OpenCover.Console.exe -register:user "-target:MyProject.Tests.dll" -targetargs:"/testcontainer:MyContainer" -output:coverage.xml -mergebyhash -excludebyfile:*Reference.cs
but service reference classes are still displayed in the XML file.
Is there a way to exclude only those specific classes created by Visual Studio?
Michael
source share