I've added a Visual Studio Test task to my build definition and enabled code coverage. It works, but it also included dependencies when counting the blocks, which makes the result useless. I'm using the Visual Studio test runner for xUnit.net
For example, when analysing code coverage in Visual Studio, I have the following result:
- summary: 13 blocks not covered, 38 blocks covered
- foo.dll: 13 blocks not covered, 20 blocks covered
- foo.test.dll: 0 blocks not covered, 18 blocks covered
When downloading the code coverage report from VSTS, I have the following result:
- summary: 6769 blocks not covered, 205 blocks covered
- fluentassertions.core.dll: 5639 blocks not covered, 155 blocks covered
- fluentassertions.dll: 1117 blocks not covered, 12 blocks covered
- foo.dll: 13 blocks not covered, 20 blocks covered
- foo.test.dll: 0 blocks not covered, 18 blocks covered
This is shown on VSTS:
FluentAssertions is only referenced and used in my test project. How can I exclude it (and other future dependencies) from the code coverage?