We get the following error when using 1.6.2 of SonarCube Extension for Azure Pipelines
Task : Prepare Analysis Configuration
Description : Prepare SonarCloud analysis configuration
Version : 1.6.2
Author : sonarsource
Help : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
==============================================================================
SYSTEMVSSCONNECTION exists true
[command]/opt/hostedtoolcache/dncs/3.0.100-preview5-011568/x64/dotnet /home/vsts/work/_tasks/SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255/1.6.2/dotnet-sonar-scanner-msbuild/SonarScanner.MSBuild.dll begin /k:AAF /o:applicita
##[error]It was not possible to find any compatible framework version
It was not possible to find any compatible framework version
##[error]The specified framework 'Microsoft.NETCore.App', version '2.0.0' was not found.
- The following frameworks were found:
3.0.0-preview5-27626-15 at [/opt/hostedtoolcache/dncs/3.0.100-preview5-011568/x64/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
Is there any support yet for .NET Core 3.0 preview bits ?
Yes, the scanner should work. I think the problem is that the scanner needs a version of the framework that is compatible with 2.0.0 but your build agent only has a preview version of .NET Core 3.0 installed.
If my understanding of the way the .NET runtime binder works is correct then the 3.0-preview isn’t treated as compatible with 2.0.0 because the binder won’t automatically roll-forward to a different major version or from a stable to an unstable preview version (see here).
Thanks for the reply, we added the .NET Core Install task into the build as we use the Microsoft Managed Build Agents but on reading you second paragraph I fear you maybe right and therefore we will be stuck until .NET 3.0 RTM’s.
Can you think of a way to workaround this until then ?
I checked the pool and we were using Ubuntu 16.04 so I switched it to Host and it got much further. It’s now blowing up in some reporting stages but it looks like something related to our yaml configuration.
It’s cheeky but if I posted it would you be able to take a quick look ? I’ve spend an hour or so on it and I can’t see what’s wrong, if I run the commands on my local machine it all seems to work for me but not working on the build server and of course being hosts I can’t just jump on the box
I ended up changing to a windows-2019 VM and that has what appears to be every dotnet core sdk from 2.1.300 - 3.0.100 currently included automatically.