Azure Devops extension sonarqube is not working with .net core 3.1.x version

While running the ADO pipeline with .net core3.1.x version and sonarqube task,sonarqube is getting failed with error as shown below.
##[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.x at [/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.
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.x at [/dotnet/shared/Microsoft.NETCore.App]

You can resolve the problem by installing the specified framework and/or SDK.

How can I solve this???

We have Azure DevOps Server 2019 running and repacked the missing Task Use .NET Core task.
With this task we install .NET Core 3.1.x either according to global.json or with a specific version.
With that SonarQube 8.2 works fine with the Prepare andRunAnalysis 4.x tasks.

The old DotNetCoreInstaller task we couldn’t install .NET core 3.1