SonarLint & StyleCop in same ruleset file (VisualStudio)

  • Operating system: Windows 10
  • SonarLint plugin version: SonarLint for VisualStudio 2022 (6.10.0.57359)
  • Programming language you’re coding in: C#
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): Developer Edition, Version 9.2.3 (build 50713)

In our projects we use SonarLint and StyleCop.
In the same rules file, we have the list of rules for both tools, example

<?xml version="1.0" encoding="utf-8"?>
<RuleSet xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Name="SonarQube - MyProjectName MyQualityProfileName" Description="This rule set was automatically generated from SonarQube https://XXXXX/profiles/show?key=XXXXX" ToolsVersion="14.0">
   <Rules AnalyzerId="SonarAnalyzer.CSharp" RuleNamespace="SonarAnalyzer.CSharp">
     <Rule ... />
     <Rule ... />
   </Rules>
   <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
     <Rule ... />
     <Rule ... />

   </Rules>
</RuleSet>

When I make changes in the SonarQube project configuration (activate/deactivate rules), I have to synchronize the SonarQube project in my VisualStudio project and the rules file is always regenerated, losing the list of existing StyleCop rules.

How can I make sure that this list of StyleCop rules is not lost and that SonarQube respects them when synchronizing?

Thanks

no suggestion?