I developed the project using in C #.net and plan to use the SonarQube for code quality and security. I am using to Install SonarQube using a docker-compose file in Windows Server 2019.
- Docker Engine - v20.10.5
- docker-compose version 1.29.0, build 07737305
I tried to scan my code with SonarScanner for .NET, but I got the below error message in the last step. I have executed the given below 3 steps, but I have an issue with the last step.
Step 1 : SonarScanner.MSBuild.exe begin /k:“ZOOM” /d:sonar.host.url=“http://localhost:9000” /d:sonar.login=“393f6ad2162d414b8514b467d0a4dab391a4cb5d”
Step 2: MsBuild.exe /t:Rebuild
Step 3: SonarScanner.MSBuild.exe end /d:sonar.login=“393f6ad2162d414b8514b467d0a4dab391a4cb5d”
I followed the steps given by the SonarQube, but while executing the 3rd step I have an error message given below. So kindly check and advise.
C:\Users\Administrator\Downloads\sonar-scanner-msbuild-188.8.131.52862-net46>SonarScanner.MSBuild.exe end /d:sonar.login=“393f6ad2162d414b8514b467d0a4dab391a4cb5d”
SonarScanner for MSBuild 5.2
Using the .NET Framework version of the Scanner for MSBuild
21:30:48.635 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
- The project has not been built - the project must be built in between the begin and end steps
- An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
- The begin, build and end steps have not all been launched from the same folder
- None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
21:30:48.638 Generation of the sonar-properties file failed. Unable to complete the analysis.
21:30:48.654 Post-processing failed. Exit code: 1