SonarCloudAnalyze@1 when executed by different agent job to that of SonarCloudPrepare@1 in azure devops fails

No problem, have a look at this guide. One good place to start regarding the test project might be:

dotnet build followed by dotnet test

dotnet test does a full build before running the tests. So if your pipeline executes dotnet build and then dotnet test , the build will be done twice, thus the analysis will be done twice.
Solution : run dotnet test --no-build , reusing the binaries from the build.

Hope that helps

Tom

1 Like