Search code examples
c#dotcoverresharper-8.0

dotCover filter with command line


What is the correct way to call dotCover command runner passing it several filters?

I've tried the following but it only excludes the first assembly:

dotcover c /TargetExecutable="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe" /TargetArguments="/testcontainer:c:\dev\SampleProject\UnitTests\bin\Debug\UnitTests.dll" /Output="c:\temp\Snapshot1.dcvr" /Filters="-:Assembly1, -:Assembly2"

it ignores anything after , in filter tag.


Solution

  • Try it with the following:

    dotcover c /TargetExecutable="c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe" /TargetArguments="/testcontainer:c:\dev\SampleProject\UnitTests\bin\Debug\UnitTests.dll" /Output="c:\temp\Snapshot1.dcvr" /Filters="-:Assembly1;-:Assembly2"
    

    Instead of comma and space as the separator, try it with semicolon.