We’re using SonarCloudAnalyze in our Azure DevOps CI pipelines. We’re getting very inconsistent results with the code coverage and have linked it to the output names of the trx / coverage files. It appears that the files are created with a name format that has a datetime suffix e.g.
Sometimes we seem to end up with multiple files with the same name except with an extra  - presumably because the tests completed at the exact same time:
When this happens the following sonar step complains that it cannot find it:
None of the following coverage attachments could be found: build000GCC_2021-01-28_14_40_42..trx
At which point the coverage drops to something like 50% of the regular coverage. When the filename are unique then it shoots back up.
If you look at the timeline of the code coverage it goes up and down daily (presumably because two tests completing at the same time is random).
dotnet test --logger trx --collect "Code coverage"
to generate the file.
Does anyone have any suggestions?