Dotnet Duplications Exclusions not working

SonarQube Version 9.3 (build 51899)
Trying to exclude several files from the duplications analysis on Azure Pipelines.

Tried with the following pipeline yaml, but the analysis still show the files in the results.

- task: SonarQubePrepare@5
  displayName: Sonar prepare
  inputs:
    SonarQube: $(sonarConnection)
    scannerMode: MSBuild
    projectKey: $(sonarProject)
    extraProperties: |
      sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)\TestResults\*.xml
      sonar.msbuild.testProjectPattern=^UnitTest.*csproj$
      sonar.coverage.exclusions=**\FunctionApp.cs  
      sonar.cpd.exclusions==**\CommunicationsCenter\Xxx.CommunicationsCenter.App\Pages\*
      sonar.verbose=false

Hi,

I usually advise people to set exclusions via the UI because they’re easy to mess up when set manually. Yes, I know you want your configuration as code. But the UI vastly simplifies things. And keeps you from doing things like using == when you meant =. :smiley:

 
HTH,
Ann

Sorry, that won’t work for us. We are a team of more than 50 developers, and not everyone has access to modify the settings of Sonarqube. We prefer to keep it in code, where it is open to everyone to create a change in the branch and go through the regular PR process. There is simply more control that way.