Differences between SonarScanner build and MSBuild

Hello @FocusOnTheSun,

Welcome on our forum! While looking at your error message:

I can see “Error CS0414”. That’s a MSBuild compiler error that doesn’t come from SonarQube analysis. Our rule code for Unused local variables should be removed is S1481.

You’ll have to review your MSBuild step arguments and probably configure some WarnAsError or TreatWarningsAsErrors parameters.