SonarCloud not detecting unused usings


  1. I have an example where SonarCloud detects unused using (using System;) in Interface but not in implementing class (Visual Studio can detect it is unused)? It can detect other usings as unused in both files.

  2. Does SonarCloud not detect unused usings for test projects?

  3. What does the setting “SonarQubeTestProject” actually do? I have not been able to find any documentation describing this.

  4. Are unused usings not detected for razor files (*.razor)?

Thank you.

Best Regards,
Anders Havn

Hey there:

Can you share a reproducer?

I suggest looking at this documentation – Analysis of product projects vs. test projects · SonarSource/sonar-scanner-msbuild Wiki · GitHub

We don’t currently support .razor files

Thank you for your reply!