SonarQube: Switch scanner version for .NET framework within azure devops

SonarQube 8.0.39 Community edition, Scanner for msbuild 5.0.4, Azure devops marketplace extension

We are currently evaluating the Sonarqube community edition before purchasing the developer edition and have hit a snag with analysing our C# .NET framework code (a mix of 4.61 to 4.8 projects).


Sonarqube installed on a windows server VM
Azure Devops (cloud not server) pipeline with marketplace extension installed. Integrating with ms build. We are using the hosted agent windows 2019

Trying to scan .NET framework solutions, scans javascript but not C# code. I see there is reference to changing the version of the sonar scanner from 5 to 4 here:

But I’m unclear whether the installation of the standalone executable(or another method to switch the version) needs to be installed on the sonarqube virtual machine we have configured, in each project’s repository, or there is a setting in the azure devops pipeline configuration we can use.

Hi @Andrew and welcome to the community !

Would you mind please share the log of an execution, with debug mode enabled ? It’ll help us troubleshoot.

I can PM you to send it, just let me know.

Thanks !

Yes, please PM me, I have gotten the log files ready.

Following the advice from Mickael, I have updated a package in Nuget.
Uninstalled the old Microsoft.Net.Compilers package and installed a replacement package called Microsoft.Net.Compilers.Toolset. Like the question below, we were using the old compilers package which caused the issue.

[C# Files are not being analyzed with Sonar Cloud and Azure DevOps pipeline]

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.