1313 # Additional properties that will be passed to the scanner,
1414 # Put one key=value per line, example:
1515 # sonar.exclusions=**/*.bin
16- sonar.coverageReportPaths=' $(Build.SourcesDirectory)/**/sonarqubecoverage/SonarQube .xml
16+ sonar.coverageReportPaths=$(Build.SourcesDirectory)/coverlet/reports/Cobertura .xml
1717
1818 - task : CmdLine@2
1919 inputs :
@@ -25,12 +25,12 @@ steps:
2525 inputs :
2626 command : test
2727 projects : ' **/*[Tt]ests/*.csproj'
28- arguments : ' --configuration $(BuildConfiguration) --collect "XPlat Code coverage"'
28+ arguments : ' --configuration $(BuildConfiguration) --collect "XPlat Code coverage" -- RunConfiguration.DisableAppDomain=true '
2929
3030- script : ' dotnet tool install --global dotnet-reportgenerator-globaltool --version 4.5.8'
3131 displayName : ' Install ReportGenerator tool'
3232
33- - script : ' reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:sonarqubecoverage -reporttypes:"SonarQube; Cobertura"'
33+ - script : ' reportgenerator -reports:$(Agent.TempDirectory)/**/coverage.cobertura.xml -targetdir:$(Build.SourcesDirectory)/coverlet/reports -reporttypes:"Cobertura"'
3434 displayName : ' Create reports'
3535
3636# - task: Palmmedia.reportgenerator.reportgenerator-build-release-task.reportgenerator@5
@@ -42,14 +42,13 @@ steps:
4242# #assemblyfilters: '-xunit\*'
4343
4444- task : PublishCodeCoverageResults@1
45- displayName : ' Publish code coverage from $(Build.SourcesDirectory)/**/SonarQube .xml'
45+ displayName : ' Publish code coverage from $(Build.SourcesDirectory)/coverlet/reports/coverage.cobertura .xml'
4646 inputs :
4747 codeCoverageTool : Cobertura
48- summaryFileLocation : ' $(Build.SourcesDirectory)/**/SonarQube .xml'
48+ summaryFileLocation : ' $(Build.SourcesDirectory)/coverlet/reports/Cobertura .xml'
4949
5050- task : SonarSource.sonarcloud.ce096e50-6155-4de8-8800-4221aaeed4a1.SonarCloudAnalyze@1
5151 displayName : ' Run Code Analysis'
5252
5353- task : SonarSource.sonarcloud.38b27399-a642-40af-bb7d-9971f69712e8.SonarCloudPublish@1
54- displayName : ' Publish Quality Gate Result'
55-
54+ displayName : ' Publish Quality Gate Result'
0 commit comments