[error]The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects

Template for a good new topic, formatted with Markdown:

  • ALM used (GitHub)
  • CI system used (Azure DevOps)
  • Run code Analysis (Azure Devops extention)
  • SWIFT
  • The SonarCloud project is privtae
    • And if you need help with pull request decoration, then the URL to the PR too
  • so Im using Azure DevOps for my iOS project, an i wanna run the sonarCloud analysis from azure DevOps, installed sonarCloud extension on azure an added two task “Prepare Analysis on sonarcloud” and “Run code Analysis” the first task works fine but the second giving me this error “[error]The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.”

  • I created the connection using sonarcloud token “security --> generate token”, and the project key “administration -> update key -> copy key”

  • what Im doing wrong ?
    thank for your help

Hi @newbegins and welcome to the community !

How do you build your SWIFT project ? With MSBuild ? Other tool ?

You may wantr to have a look at the build wrapper to plug in into your existing build.

HTH,
Mickaël

hi @mickaelcaro thank you for your response.
Im using xcode build, an in the “Prepare analysis on SonarCloud” i checked “integrate with MSBuild”.
Regards

So please check the doc i linked above about the build wrapper, you should use that.

Hi @mickaelcaro and thank you for your help.
In my “Prepare analysis on SonarCloud” task I checked Use standalone scanner, and set up an sonar-project.properties file in my root directory, following this section Analyzing other project types in the link you mentioned above.
make sure that:
-you have permission to run analysis on sonarCloud (organization --> Administration -->Permissions ).
-that Prepare analysis on SonarCloud settings file point on sonar-project.properties properly.

and Voila! hope that can help someone else.
thank you.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.