So, I generate the code coverage report by running dotnet test --no-build -l trx --collect "Code coverage"
. Unfortunately, it also computes the code coverage for the test assemblies. How do I tell it not to collect for test assemblies?
The --collect flag is an option for code coverage. If you prefer to work in the CLI, you can exclude projects as follows:
dotnet test --no-build --collect "Code Coverage;Exclude=[Exclude.Project.*],[Python.*]"
For example, this will exclude all projects with names starting with Exclude.Project and Python.