Does SonarQube support C# 8 and .Net Core 3.1?

Does SonarQube officially support static code analysis rules for C# 8 language and .Net Core 3.1 version?

Hello @Sandeep_Kandula,

C# 8 is supported since SonarC# 8.3 released late Jan’20. See
.Net Core 3+ is supported with Scanner for MSBuild 4.8 released in Nov’19. See


According documentation, “The Sonar Scanner for MSBuild requires your project to be built with MSBuild 14.0”. I was trying to use C# 8.0 switch expression and TeamCity requires to run MSBuild 16.0 (VS 2019) in order to build the VS solution but then sonar scanner didn’t work. What is the option then?

Hello @Rodrigo_Sedano,

Welcome to the SonarSource community.

The requirement that you mention is only if you want to analyze code that was initially written for versions of MSBuild older than v14.
But for recent code (eg C# 8.0 code) built with MSBuild 15 or 16, it should work too.

Since this is a quite different problem and this thread is fairly old, can I ask you to open a new thread, and attach upfront the logs of your failing build.