I'm having some trouble running the Sonarqube MSBuild Scanner with a .NET Core 2.0 application.
My script is running
* MSBuild.SonarQube.Runner.exe begin /k:"x" /n:"y" /v:"1.0.0.0" /d:sonar.cs.nunit.reportsPaths="testresults\*_results.xml" /d:sonar.scm.disabled=true /d:sonar.cs.opencover.reportsPaths="coverage_results\*.coverage.xml"
* dotnet publish project/project.csproj -f netcoreapp2.0 -c Release
* MSBuild.SonarQube.Runner.exe end
This ends up with the error:
SonarQube Scanner for MSBuild 4.0.2
Default properties file was found at C:\SonarQube\SonarQube.Analysis.xml
Loading analysis properties from C:\SonarQube\SonarQube.Analysis.xml
Post-processing started.
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
1. The project has not been built - the project must be built in between the begin and end steps
2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 upwards are supported
3. The begin, build or end steps have not all been launched from the same folder
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
18:36:22.94 Creating a summary markdown file...
18:36:22.943 Post-processing failed. Exit code: 1
1. The project has been built, the binaries are present
2. This is using MSBuild 15. Is that a problem?
3. The begin, build and end have been run from the same folder. Does the scan have to be run as the same folder as the csproj?
I appreciate any help.
Regards,
Steve Opalenski