Hi,
I’m trying to build an old .net framework 4.5.2 application using .yml file configuration in AzureDevops and I already fix some issues, but now my pipiline finish with success but they don’t publish sonar analysis to server.
One thing that I noticed, is that the SonarQubeAnalyze@5 task stop in this lines:
00:17:27.72 Writing processing summary to C:\Projects\PROJECT\_agents\_work\1\.sonarqube\out\ProjectInfo.log
Calling the TFS Processor executable...
Executing file C:\Projects\PROJECT\_agents\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.19.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.TFSProcessor.exe
Args: ConvertCoverage C:\Projects\NetView\_agents\_work\1\.sonarqube\conf\SonarQubeAnalysisConfig.xml C:\Projects\NetView\_agents\_work\1\.sonarqube\out\sonar-project.properties
Working directory: C:\Projects\PROJECT\_agents\_work\1
Timeout (ms):-1
Process id: 17160
Attempting to locate the CodeCoverage.exe tool...
Attempting to locate the CodeCoverage.exe tool using setup configuration...
Attempting to locate the CodeCoverage.exe tool using registry...
WARNING: Failed to find the code coverage command line tool. Possible cause: Visual Studio is not installed, or the installed version does not support code coverage.
Process returned exit code 0
The TFS Processor has finished
Calling the SonarScanner CLI...
Executing file C:\Projects\PROJECT\_agents\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.19.1\classic-sonar-scanner-msbuild\sonar-scanner-4.8.1.3023\bin\sonar-scanner.bat
Args: -Dsonar.scanAllFiles=true -Dproject.settings=C:\Projects\PROJECT\_agents\_work\1\.sonarqube\out\sonar-project.properties --from=ScannerMSBuild/5.15 --debug <sensitive data removed>
Working directory: C:\Projects\PROJECT\_agents\_work\1
Timeout (ms):-1
Process id: 17012
Process returned exit code 0
The SonarScanner CLI has finished
00:17:28.018 Post-processing succeeded.
And I saw in other .net core case that after this steps, this task execute a lot of commands and print SUCCESS at the end.
I try to search any information in sonar and azure devops files, but without success.
This is my .yml file today:
pool: SelfHostedAgent-Windows
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
# Prepare Analysis Configuration task
- checkout: self
fetchDepth: 1
clean: true
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: SonarQubePrepare@5
displayName: 'Prepare analysis on SonarQube'
inputs:
SonarQube: 'SonarQube'
scannerMode: 'MSBuild'
projectKey: 'PROJECT_KEY'
extraProperties: |
sonar.cs.vscoveragexml.reportsPaths=$(Agent.TempDirectory)/**/*.opencover.xml
sonar.cs.opencover.reportsPaths=$(Agent.TempDirectory)/**/*.opencover.xml
sonar.cs.xunit.reportsPaths=$(Agent.TempDirectory)/testresults.trx
sonar.scm.disabled=true
sonar.verbose=true
# DotNet build
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
# SQ Run Code Analysis task - QC3
- task: SonarQubeAnalyze@5
displayName: RUN SonarQube
inputs:
jdkversion: 'JAVA_HOME_17_X64'
# Complete the analysis and upload the results to the server
- task: SonarQubePublish@5
displayName: 'Publish analysis results to SonarQube'
Cloud you help me?
I’m kind of lost right now,