Prepare analysis fails after upgrade to version 1.19.0

Template for a good new topic, formatted with Markdown:

  • ALM used ( Azure DevOps)
  • CI system used (Azure DevOps)
  • Languages of the repository (dotnet core)

After change version task “Prepare Analysis” of 1.17.0 to 1.19.0 my pipeline receveid error bellow:

My enviroment don’t changed, I use a agent Linux (ubuntu 18.04) to execute this pipe. Remembering that this task is nothing more than configuring the sonarcloud endpoint, this explanation was just additional information.

Before this version update, this task worked normally successfully, see:

Can you help?

Regards

Hi @andressantos10

The change i see here is that you are now using the .NET Core version of the Scanner (by invoking the .DLL directly) which will indeed check if you have the proper version of .NET Core installed (it is the major version 2 currently with that task), and compare to the other screenshot that uses the .NET Framework version of the Scanner (v4.6).

We’re currently working on improving the detection of the .NET Core version to run the proper version of the Scanner, but in the mean time here, if you want to continue using this task, you need to install the .NET Core SDK v2 to be able to run it.

HTH,
Mickaël

Hi @mickaelcaro
I use the option “Integrate with MSBuild” to prepare analysis:

I understand are unnecessary install SDK v2, correctly?

Bellow, version dotnet SDK and runtime installed in agent machine:
image

So you may want to add the task to use SDK version 2 jusd before the prepare analysis, then add the one that you already have to do restore, build and test (if needed), and add back the use SDK 2 for the Run Code Analysis task.

HTH,