How to set parameters for C# Roslyn rules?


I am working with SonarQube 7 LTS as we want to upgrade from version 5 to 7, and recently imported custom C# rules by using the Roslyn SDK.
They appear on my rules page, so I can add them to my custom quality profile, but I can’t set any parameters for the rules. In SonarQube 5.6, using the identical rules, I could even set different rule parameters for each quality profile (see screenshot below). In SonarQube 7, i can only change the Severity.
I tried exporting the quality profile from version 5.6, where each of these rules have their respective parameters in the .xml file (example below). But those parameters are being ignored when importing to version 7. So, how to change the rule parameters for SonarQube 7?



  • SonarQube 7 LTS
  • SonarQube Roslyn SDK 2.0
  • SonarScanner for MSBuild 4.8

Solved. Syntax was incorrect. Correct syntax for parameters:

    <description> <![CDATA[Threshold value]]> </description>