SonarCloud isn’t scanning entire Xamarin Forms project

Hi team,

I have a Xamarin Forms projects which is located in Bitbucket.
I have a pipeline in my project folder (bitbucket-pipelines.yml) to execute the sonar scan and code quality check.
I have enabled the SonarCloud feature for my repo as well. In the SonarCloud when I check it just shows few files from my Xamarin Android project and fails to scan my Xamarin common code, Test project, iOS project and other Android Project files.

I have tried to follow this document SonarCloud MSBuild but no luck.

It would be great help if there is any proper document available to integrate SonarCloud,BitBucket with Xamarin Forms Code.

Also when I try to build the project using the yml steps i get below error for both Android and iOS
**MSB4019: The imported project “/usr/local/share/dotnet/sdk/3.1.403/Xamarin/iOS/Xamarin.iOS.CSharp.targets” was not found. **
Confirm that the expression in the Import declaration “/usr/local/share/dotnet/sdk/3.1.403//Xamarin/iOS/Xamarin.iOS.CSharp.targets” is correct, and that the file exists on disk.

This is my first time using any kind of continuous code quality tools so I appreciate any help I can get!


Hi @divikamath and welcome to the community !

Have you successfully build your solution using Docker without SonarCloud ?

Seeing the target not found error, it seems not. I suggest that you give couple of tries locally maybe to have a fully working docker image, before moving on with SonarCloud.