Getting Error While Running My Xamarin Project

Hi,

I am getting an error while running Sonar against my Project which is a Xamarin project
Here are the error Details:
ERROR: Unable to execute Sonar
ERROR: Caused by: Line 1071 is out of range for file [moduleKey=PRJ-012016.MOBILE, relative=ART.Mobile.ViewModel/Viewmodels/Activity/ViewActivitiesPageViewModel.cs, basedir=D:\Personal\ART\GIT\ARTMobile]. File has 1065 lines.

i have tried out manyways like excluding the particluar file and clearing cache in .sonar\cache folder
but still encountering with the same error.
please help me to resolve this issue

Regards.

Hi Lokesh,

Welcome to the SonarSource Community!

Can you run your build and scan again with the verbose option (/d:sonar.verbose=true), zip the entire build output logging (from the entire process) and post here so that I can review?

Thanks

Brian

Sonarqubelog .txt (773.6 KB)
Hi Brian,

I have ran the sonar by adding sonar.verbose=true property
PFA attached output logs.
hope i’ll get a permanant fix for this

Regards
Lokesh

Hi Lokesh,

The log you provided is cut off and only shows the end of the process. Please provide the full log. I’m interested in what commands you are using to run this build as well as how you are configuring the Scanner for MSBuild.

Brian

Hi Brian,

we haven’t used Scanner for MSBuild for the project. we are using sonarqube which we can run the analyze using the command “sonar-runner” which is working for all other xamarin projects except the one i have shared. is it necessary to use the Scanner for MSBuild?

Thanks,
Lokesh

Hi Lokesh,

Can you let me know what versions of SonarQube and the Sonar Scanner you are running?

Older versions of SonarQube (prior to version 6) used to allow analysis of .NET projects without using the MSBuild scanner, but this is no longer supported. If you are using these, I suggest you upgrade to a modern version and use the MSBuild scanner.

Brian

Hi Brian,

i am using sonarqube 6.4 and sonar-runner 2.4 . i got the issue that the project is built on Mac and i’m trying run the sonar on Windows for the same project.which has some compatibility issues like (improper lines ending and encoding). i have cleared all the things now i’m getting the below error sonarlogs.txt (701.6 KB)

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 7:12.661s
Final Memory: 20M/618M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: Start pointer [line=37, lineOffset=53] should be before end pointer [line=37, lineOffset=53]

Kindly help me to resolve this error,attaching sonar logs FYI.

Regards,
Lokesh V

Hi Lokesh,

You are using an extremely old version of SonarQube and the scanner. I recommend you update to the latest LTS version (7.9) or higher and migrate your scans to the MSBuild scanner. There’s a lot of great new features added in the last three years.

Brian