Why do compiler gives error instead of warning for variable which is assigned but its value is never used

Ah, sorry that we can’t help then. :confused: Sounds like you need to fix your build, and then revisit SonarQube analysis. SonarQube needs a successful build for C# analysis.