I am trying to collect my code coverage for my .net core 6 project, I have written some tests and I am planning to upload the results to sonarqube.
I read this documentation and decided to go with the dotnet-coverage tool, for some reason I can't get the code coverage, running the command
dotnet tool run dotnet-coverage collect 'dotnet test' -f xml -o 'tests/TestResults/coverage.xml'
gives me the following message No code coverage data available. Profiler was not initialized.
and creates an empty coverage.xml file, I am using a macos with m1 processor, not sure if that makes any difference.
I am aware of other ways of generating code coverage but I am curious as to what that message means.