Automatic analysis now supports .NET Framework projects

Hi there, fellow .NET developers,

We are proud to announce that SonarCloud now supports Automatic Analysis for .NET Framework projects on Github.

Until now, we could analyze your .NET (sdk-style) projects automatically without requiring any configuration on your part. Starting today, we can also scan your .NET Framework projects automatically! And yes, I am talking about the old-style, non-sdk projects that we all know and love.
We also support Shared Projects (shproj) if you use those.
We hope this will make it easier to quickly start analyzing existing code that you do not have the time or means to port to .NET.

Enjoy easy scanning and let us know what you think.

2 Likes

Is there any benefit to running the scanner as part of our own pipelines still?

Two benefits of using CI analysis and not just Autoscan at this time:

  1. You need code coverage measurements, as this is not yet supported in Automatic Analysis
  2. You need the extra precision that comes with building the exact set of projects you want (for example, you might have examples you do not care about, or a tricky build process that changes the results for any reason)

Denis

Great News @denis.troller

How do we set this up in GitHub actions?
or
How do we enable this for existing projects?

Hi @omnio,

Automatic analysis does not require any github action.
In fact, if you have CI analysis already setup I would say you might want to stay like this since

  • Automatic analysis does raise a bit more false-positives due to not knowing exactly what project you are trying to build and not being able to download all dependencies in all cases
  • Automatic analysis cannot include coverage

That being said, any new project based on a Github repository will default to automatic analysis.
Any existing project can be switched to automatic analysis by

  1. Removing anything sonar-related from the GH workflow file
  2. Changing the switch in SonarCloud under Administration/Analysis Method

If you already have a project that was not previously eligible, you can also trigger a recheck from that page.

Denis

1 Like