Closed Cjewett closed 3 months ago
Microsoft.CodeCoverage supports dynamic instrumentation which will work the best in this scenario: https://github.com/microsoft/codecoverage/blob/main/docs/instrumentation.md#static-and-dynamic-instrumentation Dynamic instrumentation is not modifying files on disk so parallel run should be possible.
Static instrumentation is enabled by default on non-Windows envs. Add <EnableStaticManagedInstrumentation>True</EnableStaticManagedInstrumentation>
to your config to disable it.
Thanks for the quick reply @jakubch1 !
I also posted this question in Coverlet (https://github.com/coverlet-coverage/coverlet/issues/1651) because our company currently uses both Coverlet and Microsoft.CodeCoverage. There is a desire to turn on CreateHardLinksForCopyLocalIfPossible to reduce the size of our build output because we're running out of storage. When using Coverlet it hits
System.IO.Exception TestProject.dll cannot be accessed because it is being used by another process
. That is expected considering how code coverage normally works due to instrumentation, but I'm hoping this case has been handled in the official Microsoft solution. A couple questions: