Custom plugin rules are not detected on source code scan result!

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    => sonarqube 7.9.1,
    => scanner 4.6.2
    => Sample Plugin(Visual Studio Analyzer with Code Fix Project based on Roslyn)

  • what are you trying to achieve
    => Custom plugin rules must be detected on my project.
    even I scan my project on sonarqube, there is no detected result. (Count : 0)

  • what have you tried so far to achieve this
    => I already succeed to adjust my custom plugin rules on my sonarqube server.
    BUT It doesn’t work in specific environment.
    I installed same version of related sonarqube configurations.

  1. Visual Studio 2017
  2. sonarqube 7.9.1 & sonar-scanner 4.6.2
  3. postgresql 11.7 64bit
  4. jdk-13.0.2 win64bit
  5. same ruleset, same c# project, all same version.

I have quite a lot of experience to set the sonarqube server and to apply custom plugin ruleset. and of course I succeed to set all those of previous results.
but Custom plugin rules are not detected on specific environment PC even I successfully set the ‘Quality Profiles’.

What do I have to do?
When detecting a custom plugin rule, what is the specific internal process?
Please let me know how to solve this problem.

Thank you.

hi @steve

just to clarify: is this custom plugin build with the SonarQube Roslyn SDK?


Yes. right.
I installed .NET Compiler Platform SDK

and I created sample project provided from Visual Studio Analyzer.

then, I got a ‘Analyzer1.1.0.0.nupkg’ file after the sample project was built successfully.

Finally, I made a plugin by using ‘Analyzer1.1.0.0.nupkg’ and ‘RoslynPluginGenerator’ from SonarQube Roslyn SDK.
I mostly(over 90%) succeeded to set the environment of SonarQube server.

I think custom plugin don’t work well depends on specific environment. It seems like version of MSBuild(Visual Studio version) or something. It is because sonar-scanner uses MSBuild(Developer Command Prompt for VS 20xx).
I don’t know the compatibility exactly.

To be transparent, we haven’t tested the Roslyn SDK for SQ with the latest LTS version of SonarQube - this project is not actively maintained at the moment due to other company priorities.

Did you find some relevant information in the debug logs of the analysis?

No. we just re-installed VisualStudio 2017 Community from online.
Probably sonarscanner is Not working on VisualStudio 2017 Pro offline installer.