When will there be support for .Net Core 3 in SonarScanner for Azure DevOps?

Could you please be a bit more precise on which kind of error do you encounter ?

Thanks.

Hi,

(While looking at the log I realized that one of the links did not work: https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops)

Here are the logs:
2020-02-20T08:31:49.0351301Z ##[section]Starting: prepare analysis on sonarcloud
2020-02-20T08:31:49.0355399Z ==============================================================================
2020-02-20T08:31:49.0355528Z Task : Prepare Analysis Configuration
2020-02-20T08:31:49.0355599Z Description : Prepare SonarCloud analysis configuration
2020-02-20T08:31:49.0355689Z Version : 1.10.0
2020-02-20T08:31:49.0355736Z Author : sonarsource
2020-02-20T08:31:49.0355788Z Help : Version: 1.10.0. More Information
2020-02-20T08:31:49.0355890Z ==============================================================================
2020-02-20T08:31:49.5481738Z SYSTEMVSSCONNECTION exists true
2020-02-20T08:31:49.9210690Z [command]/opt/hostedtoolcache/dncs/3.1.101/x64/dotnet /home/vsts/work/_tasks/SonarCloudPrepare_xxxxxxxxxxxxxxxxx/1.10.0/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll begin /k:Workplace-Domain /o:xxxxxxxxxxx
2020-02-20T08:31:49.9405817Z ##[error]It was not possible to find any compatible framework version
The framework ‘Microsoft.NETCore.App’, version ‘2.0.0’ was not found.

  • The following frameworks were found:
    3.1.1 at [/opt/hostedtoolcache/dncs/3.1.101/x64/shared/Microsoft.NETCore.App]
    You can resolve the problem by installing the specified framework and/or SDK.
    The specified framework can be found at:
  • https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=ubuntu.16.04-x64
    2020-02-20T08:31:49.9406374Z It was not possible to find any compatible framework version
    2020-02-20T08:31:49.9406788Z The framework ‘Microsoft.NETCore.App’, version ‘2.0.0’ was not found.
    2020-02-20T08:31:49.9407078Z - The following frameworks were found:
    2020-02-20T08:31:49.9407144Z 3.1.1 at [/opt/hostedtoolcache/dncs/3.1.101/x64/shared/Microsoft.NETCore.App]
    2020-02-20T08:31:49.9407189Z
    2020-02-20T08:31:49.9407291Z You can resolve the problem by installing the specified framework and/or SDK.
    2020-02-20T08:31:49.9407342Z
    2020-02-20T08:31:49.9407709Z The specified framework can be found at:
    2020-02-20T08:31:49.9408365Z - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.0.0&arch=x64&rid=ubuntu.16.04-x64
    2020-02-20T08:31:49.9409998Z ##[error]The process ‘/opt/hostedtoolcache/dncs/3.1.101/x64/dotnet’ failed with exit code 150
    2020-02-20T08:31:49.9445344Z ##[section]Finishing: prepare analysis on sonarcloud

(While looking at the log I realized that one of the links did not work: https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops)

You should add a trailing forward slash in the url, this works.

For the rest, indeed, we haven’t yet shipped the full dotnet core 3 new assembly in the extension, this will be done soon, i created a ticket : https://jira.sonarsource.com/browse/VSTS-230

In the mean time and as a workaround, you can invoke the scanner for msbuild in command line, using the dotnet core 3 assembly.

Sorry for the inconvenience !

Mickaël

Hi,

Thanks for all the replies!

Regards

Just wondering any updated on .netcore3.x support?

here is the workaround I used for the mean time! may help others.

  1. Install .net sdk 2.x (using .NET Core Tool Installer)
  2. Prepare Analysis Configuration
  3. Install .net sdk 3.x (using .NET Core Tool Installer)
  4. Build your application (which is targeting netcore3.x)
  5. Test your application (which is targeting netcore3.x)
  6. Install .net sdk 2.x (using .NET Core Tool Installer)
  7. Run Code Analysis
  8. Publish Quality Gate Result

verify in SonarQube project the analysis as part of build is posted.

1 Like

Hi there,
currently we are using the workaround. But it’s ugly & the pipeline is longer. Is there any news regarding porting it to .net 3.x runtime?
Appreciated!
J.

anyone?

Hi, we are also experiencing this same issue now we’ve finished a company wide upgrade from our legacy codebase and now can’t use SonarQube since we are using NETCore 3.1.

Any further info on when this will be supported?

Thanks.

And I see it is still in “TODO” state :frowning:
https://jira.sonarsource.com/browse/VSTS-230

Any hope it will be implemented soon?

Please fix this. .NET Core 2.1 (LTS) will be unsupported in 3 weeks! This will be a security issue.

EOL date: 21 Aug 2021. See .NET Core | endoflife.date

I guess this should fix it:

VSTS-230 - Run under .NET Core 3 by 304NotModified · Pull Request #161 · SonarSource/sonar-scanner-vsts (github.com)

As there is a msbuild version for .NET Core 3

@mickaelcaro please make sure this will be fixed ASAP. In 2 weeks .NET Core 2.1 will be unsupported.

That means - .NET Core 2.x will be unsafe!

See .NET Core 2.1 will reach End of Support on August 21, 2021 | .NET Blog (microsoft.com)

That said, we won’t be issuing security updates for .NET Core 2.1 starting September 2021

and

.NET Core 2.1 will be reaching end of support on August 21, 2021 and after this date we will no longer provide updates including security fixes, or technical support for this version. We strongly recommend you migrate your applications to .NET Core 3.1 or later before this date.

To be clear, 2.0, 2.2 and 3.0 are already unsupported. The only supported version for 2.0+, is 3.1 - see .NET Core | endoflife.date

We also need time to update this extension!

See my PR of a fix

@mickaelcaro any updates on this one? there are only 2 days left before .net core 2.1 is EOL.

No update. No response. And .NET Core 2 is now officially not secure any more.

Very disappointed sonarsource doesn’t understand security.

Please update the ticket with updated version

Hi,
We are aware that the .NET Core 2 framework has been deprecated few days ago. This is on the way and will be released within the next 2 weeks.
Kind regards,
Christophe

This change couldn’t come soon enough.

Is this issue related? see SonarCloud Azure DevOps extension 1.25 broken

Gee! for sure it was related. See the fix there.