I have sonarqube 8.7, sonar scanner for .net4.6 version 5.1.0.28487 and msbuild 15.0.
When I perform sonar scanner process to analyse the code with the steps said in guide:
SonarScanner.MSBuild.exe begin /k:“PROJECT” /d:sonar.host.url=“http://localhost:9000” /d:sonar.login=Token
msbuild solution.sln /t:Rebuild
SonarScanner.MSBuild.exe end /d:sonar.login=Token
Where solution.sln is coded in c# and has project1.csproj, project2.csproj and project3.csproj.
I launch to build the solution.sln, project1.csproj and project2.csproj built it correctly, but when we try to build project3.csproj it never end over the time (it persist in same point all times).
It’s important to said that if I built them without sonar scanner its build correctly and finish in the stipulated time.
I have tried with different mbuilds (Visual studio 2017 and 2019) and on different machines but keeps happening.
What you describe could be a bug in the Scanner for .Net. However before we can investigate you would have to upgrade to the latest version of the Scanner (5.2.2, see SonarScanner for .NET | SonarQube Docs) and the latest version of SonarQube (8.9.x, see Download | SonarQube), and retest.
If you still reproduce with these latest versions, we’ll dig deeper.
Due to company policy I cannot send you the build log of the solution.
I send you the begin process here: begin.log (6.4 KB)
I send you the msbuild process filtered here: msbuild.log (3.1 KB)
I can’t send you the end process log because the msbuild never ends and if I want to finish it, I only can stop it with CTRL+C (but this project doesn’t build ever).
Thanks for minging me. I reviewed the logs at the time and did not see anything that could explain the problem. I looked again today. One thing I noticed is that it seems to be a sample project. Would it be possible to share this sample project with me so that I can do some tests on my side ? A simple zip of the project from its root directory (were the SLN is) would do. It would even be possible to share with me privately if that is more acceptable to you.