Only part of the code being analysed

Good morning im having an odd issue.

I’m trying to analysed a solution which contains 2 projects.

For some reason only the small project where the business logic is being analysed.

The main core project does not seem to be analysed. See pics attached.

Grateful for any recommendations or advice.

From the dasboard I can only see 17k lines of code analysed, which refers to BL_CSC2 project.

Hi @jjferreira,

Could you please let us know what are your versions of:

  • SonarQube
  • SonarC#
  • Scanner for MSBuild

Also, please provide the logs of the end step (ideally with the debug/verbose mode enabled).


Hi there apologies for the delay in replying

  • SonarQube: 7.3
  • SonarC#: (build 5690)**
  • the scanner of jenkins: Sonnarscanner for MSBuild

This is the information you asked for and attached is the log.

Kind Regards

@Ammo good morning Amaury, any ideias what the issue is?

Kind Regards

Hi @jjferreira,

You can see that during the build step you have a lot of warnings like this one:

CSC : warning CS8032: An instance of analyzer SonarAnalyzer.Rules.CSharp.UriShouldNotBeHardcoded cannot be created from C:\Users\jferreira\AppData\Local\Temp\.sonarqube\resources\0\SonarAnalyzer.CSharp.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

You can also see some references to Microsoft.Net.Compilers.1.0.0 which means that you are forcing the build with an older version of Roslyn. As stated in the release notes we require at least Roslyn 1.3 so you will need to update to the version 1.3.2.

Please let me know if that didn’t solve the issue.


Thank you very much this seems to have resolved the issue.

All I had to do was to install this nugget

Thank you again.

Must say was expecting different numbers, but its progressing.