Hi Team,
We are using windows latest agent pool from azure devops. where we want to run and publish test cases into sonarQube portal. where we are getting bellow error.
12:18:15.688 Fetching code coverage report information from TFS…
12:18:15.691 Attempting to locate a test results (.trx) file…
12:18:15.706 Looking for TRX files in: D:\a\1\TestResults
12:18:15.707 No test results files found
12:18:15.707 Attempting to locate a test results (.trx) file…
12:18:15.713 Looking for TRX files in: D:\a\1\TestResults
12:18:15.713 No test results files found
Generating SonarQube project properties file to D:\a\1.sonarqube\out\sonar-project.properties
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
- 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 and 15.0 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)
Writing processing summary to D:\a\1.sonarqube\out\ProjectInfo.log
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
12:18:15.736 Creating a summary markdown file…
12:18:15.737 Post-processing failed. Exit code: 1
here is how we setup the configuration:-
dotnet tool install --global dotnet-sonarscanner --version 4.3.1
dotnet tool install --global coverlet.console --version 1.6.0
dotnet tool install --tool-path tools dotnet-reportgenerator-globaltool --version 4.6.1
dotnet tool install --global dotnet-coverage
dotnet add package coverlet.msbuild --version 6.0.0
dotnet build-server shutdown
dotnet sonarscanner begin /k:“si-auth” /v:$(VERS) /d:sonar.verbose=true /d:sonar.host.url=“$(sonarqube-host)” /d:sonar.login=“$(sq-ado-apitoken)” /d:sonar.branch.name=“$(currentBranch)” /d:sonar.cs.opencover.reportsPaths=“$(System.DefaultWorkingDirectory)/coverage.opencover.xml”
dotnet build
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=$(System.DefaultWorkingDirectory)/coverage.opencover.xml’
dotnet sonarscanner end /d:sonar.login=“$(sq-ado-apitoken)”
we need help to understand what configuration we are missing.