.NET 6 and C#10 support update

Hi Emre, welcome to the community :slight_smile:

I don’t believe the Bitbucket SonarCloud extension requires updating. You pipelines should install the SonarScanner for .NET directly (probably the CLI version) and should automatically pull the latest scanner version once it’s released. Let me know if you have any problems.

Tom

Hi, thanks Tom, it’s ok to not requires updating, actually i wanna ask you, will Bitbucket SonarCloud works well with .net 6 in same time with your updates, and how i get notification about that.

Hi Michael, welcome to the community :slight_smile:

The update to the scanner will allow it to run on a build agent with only .NET 6 available. One of the jobs of the scanner is to download the analyser from SonarQube (or SonarCloud). The analyser is the component that finds issues in your code and this also needs updating to work with the new features in C#10. The latest version of our analyser, that is capable of parsing C# 10 and recognising the new scoped namespace feature, requires the recently released SonarQube 9.2 and future versions of SonarQube will continue to improve the analysis of C#10 features. SonarQube versions prior to 9.2 may raise errors during analysis depending on the features you are using. It is not possible to update the analyser without updating the version of SonarQube. On Sonarcloud the analyser is updated as soon as it is available.

The general guideline if you are using SonarQube is to keep updating to the latest version if you want the best support for new language features.

I hope that answers your question and helps clear up any confusion between what the scanner and analyser do.

Tom

Yes! SonarCloud is the best way to get the latest and greatest analysis if you are using new languge versions :slight_smile: The analyser will be updated automatically and you won’t need to do anything, and if your bitbucket pipelines are downloading the latest scanner then that will automatically update too.

If you want to know what’s being released I will post announcements here and for significant updates we will post a link from the ‘Whats New on SonarCloud’ section available on the top menu bar in SonarCloud.

Tom

1 Like

2 posts were split to a new topic: .NET 6 project scan does not work

Hello Again

On Friday we released a new version of the SonarScanner for .NET that supports running on environments with only the .NET 6 SDK available. This should help those folks using GitHub Actions or the .NET SDK Docker container as a build environment. Rather than create a new version, we have made the .NET 5 version a .NET 5+ version that is forward compatible. You can download the new version from the SonarQube and SonarCloud documentation. We are currently working on updating the Azure Devops Extension, I’ll update here once that’s released.

Tom

5 Likes

Are there plans to make this analyzer available for the current LTS version of SonarQube (8.9)? My company follows LTS release cycle for upgrades, and this is an impediment to continued SonarQube use by projects using dotnet.

3 Likes

Hi Mike

Welcome to the community :slight_smile:

Our policy with LTS versions is only to fix bugs and apply security patches to ensure that we maintain complete stability for those who need it. Updating the analyser would add new functionality so I’m afraid we are unable to do this. To have support for the latest language versions we recommend you upgrade to the latest SonarQube version (for which we can also provide commercial support if you need it).

I hope that provides some clarity, even if it doesn’t provide you with a solution!

Tom

seems it is not so much backward compatible in the end :frowning:

I would really, really prefer deploying chnages in a more controlled (and safe) matter, e.g. enforcing the new version of the extension with the version number, see SonarCloud Azure DevOps extension 1.25 broken - #7 by jvilimek

1 Like

Hi @jvilimek

Please note that the change refering to .NET5/6 is not the one that introduced the regression. Sorry about that.

Mickaël

1 Like

Thanks. Btw. any place (github/blog/…) where we can check the current progress of .net C#10 support? e.g. following

Some kind of feature mattrix with indication whenever its supported or not would be awesome (both in sonarscanner and devops extension/other tools if it may be different).

1 Like

Hi Jan

There isn’t anything public at the moment but I understand the need. I’m reviewing the documentation at the moment and I’ll see what I can do.

Thanks

Tom

1 Like

Any updates on the ADO Extension? :slightly_smiling_face:

A post was split to a new topic: Is license kept when upgrading from 8.9 LTS to 9.2

Hello,

So with SonarQube 9.2.4 and the latest sonar-scanner I should not be getting errors / warnings when using file scoped namespaces? (I think I do…)

Hi Jens

Welcome to the community :slight_smile:

Can you share an example of an issue that’s being raised on file scoped namespaces please?

Thanks

Tom

Turns out I was testing the wrong thing.
It just works now.
Sorry :confused:

2 Likes

Hi Tom,
any news pls?
Thanks!
J.

We have also the policy, that only LTS versions are installed. Thus unless a new LTS is released, we will not be able to get the new analyzer. BTW, this affects Java 17 as well.

Hi All

We’ve just released Scanner for .NET 5.5.3 which now supports .NET 6 MVC projects (that were previously causing issues). This is also now available on the Azure Devops extension for SonarQube and SonarCloud. The work on fully analyzing C# 10 features are ongoing and I’ll keep you updated as we release more improvements.

Let me know if you have any questions

Tom

2 Likes