Hi,
The updated ADO extension should be released in early February.
Ann
Hi,
The updated ADO extension should be released in early February.
Ann
I also have the same issue with this task, which is still broken. It’s been over a month since you said it should be released. It is unacceptable to make a promise and then NOT come back later on and say the feature/bugfix is postponed/delayed. And the reason for it.
What is the current status?
Hi,
We still see the warning:
CodeCoverage.exe is deprecated. Use dotnet-coverage global tool or Microsoft.CodeCoverage.Console instead. Some features of CodeCoverage.exe will be removed in next release of Visual Studio.
It looks like the Azure DevOps task (SonarCloudPrepare@1 and SonarCloudAnalyze@1) for SonarCloud does still not pick up version 6 of SonarScanner.
The scan option that is used is: ‘MSBuild’
When running today, I see:
Starting: SonarCloud Analyze
==============================================================================
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.44.0
Author : sonarsource
Help : Version: 1.44.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
[More Information](https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarcloud-extension-for-azure-devops/)
==============================================================================
D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.41.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
**SonarScanner for MSBuild 5.15**
Shouldn’t we see SonarScanner 6 here? can you confirm which verison of the tasks are expected to be active in Azure DevOps?
The SonarCloud tasks are defined as:
- task: SonarCloudPrepare@1
displayName: "SonarCloud Prepare"
inputs:
SonarCloud: '${{ parameters.sonarCloudServiceConnectionName }}'
organization: '${{ parameters.sonarCloudOrganization }}'
scannerMode: 'MSBuild'
projectKey: '${{ parameters.sonarCloudProjectKey }}'
projectName: '${{ parameters.sonarCloudProjectName }}'
projectVersion: "$(Build.BuildNumber)"
- task: SonarCloudAnalyze@1
displayName: "SonarCloud Analyze"
inputs:
jdkversion: 'JAVA_HOME_17_X64'
Thank you
Hi,
The new version hasn’t been released yet. Unfortunately, I don’t have a timeline for you.
Ann
Even I am facing the same issue which is “CodeCoverage.exe is deprecated. Use dotnet-coverage global tool or Microsoft.CodeCoverage.Console instead. Some features of CodeCoverage.exe will be removed in next release of Visual Studio”.
Do we have to use any other dotnet test coverage tool like coverlet to fix the error?
Please help out.
I have tried but some of the third party coverage tools like coverlet are not supported in our unit test project as we use dotnet v4.8. Is there any other solution to this problem?
Hi, @Tejaswini_Chitnis,
Have you tried looking at AltCover? It supports .NET framework and we use it as part of our pipelines.
@Tejaswini_Chitnis
The message is generic and tied to the version of the task you use.
Are you using SonarQube or SonarCloud?
Which version of the extension? Which version of the task?
I have notified someone who should be able to help explain what is going on.
I have setup AltCover but still I seem to be getting the same error -
"D:\TFSAgents\Net\5\_work\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.36.1\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
SonarScanner for MSBuild 5.15
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
10:59:45.684 10:59:45.684 WARNING: File 'C:\Documents and Settings\z000k0rz\Desktop\RTFEditor.ico' does not exist.
10:59:45.71 10:59:45.71 WARNING: File 'D:\TFSAgents\Net\5\_work\14\s\EDIBaseLWKZ\ClassDiagram1.cd' does not exist.
10:59:45.725 10:59:45.725 WARNING: File 'D:\TFSAgents\Net\5\_work\14\s\EdibaseAM\ClassDiagram1.cd' does not exist.
10:59:45.729 10:59:45.729 WARNING: File 'D:\TFSAgents\Net\5\_work\14\s\EdibaseConnectionRequest\ClassDiagram1.cd' does not exist.
Calling the TFS Processor executable...
Attempting to locate the CodeCoverage.exe tool...
Attempting to locate the CodeCoverage.exe tool using setup configuration...
Multiple versions of VS are installed: 16.11.34902.97, 17.9.34902.65
Code coverage command line tool: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
Fetching code coverage report information from TFS...
Attempting to locate a test results (.trx) file...
Looking for TRX files in: D:\TFSAgents\Net\5\_work\14\TestResults
No test results files found
Did not find any binary coverage files in the expected location.
Falling back on locating coverage files in the agent temp directory.
Searching for coverage files in D:\TFSAgents\Net\5\_work\_temp
All matching files: count=2
D:\TFSAgents\Net\5\_work\_temp\TestResults\75b725b5-9007-429a-9282-ee934a6c8839\AD7R47M4_DEMCHDC8A4A_2024-05-23.10_59_20.coverage
D:\TFSAgents\Net\5\_work\_temp\TestResults\AD7R47M4_DEMCHDC8A4A_2024-05-23_10_58_30\In\DEMCHDC8A4A\AD7R47M4_DEMCHDC8A4A_2024-05-23.10_59_20.coverage
Unique coverage files: count=1
D:\TFSAgents\Net\5\_work\_temp\TestResults\75b725b5-9007-429a-9282-ee934a6c8839\AD7R47M4_DEMCHDC8A4A_2024-05-23.10_59_20.coverage
Executing file C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe
Args: analyze /output:D:\TFSAgents\Net\5\_work\_temp\TestResults\75b725b5-9007-429a-9282-ee934a6c8839\AD7R47M4_DEMCHDC8A4A_2024-05-23.10_59_20.coveragexml D:\TFSAgents\Net\5\_work\_temp\TestResults\75b725b5-9007-429a-9282-ee934a6c8839\AD7R47M4_DEMCHDC8A4A_2024-05-23.10_59_20.coverage
Working directory: D:\TFSAgents\Net\5\_work\_temp\TestResults\75b725b5-9007-429a-9282-ee934a6c8839
Timeout (ms):60000
Process id: 12472
**CodeCoverage.exe is deprecated. Use dotnet-coverage global tool or Microsoft.CodeCoverage.Console instead. Some features of CodeCoverage.exe will be removed in next release of Visual Studio**."
Hello,
the new version of the Azure Devops extension is currently in the works. If everything goes according to the plan, it will be released within the next three weeks.
Thank you for the response. May I know how we would be notified on the new version release?
Hello,
New versions of the Azure DevOps extensions have been released using the latest scanner versions.
The SonarCloud extension has new version 2 tasks that will use the latest scanner versions
- task: SonarCloudPrepare@2
...
- task: SonarCloudAnalyze@2
...
- task: SonarCloudPublish@2
...
And the SonarQube extension has new v6 tasks
- task: SonarQubePrepare@6
...
- task: SonarQubeAnalyze@6
...
- task: SonarQubePublish@6
...
All the best,
@Lucas_Paulger Has there been an official announcement for that? I can’t find one. And the samples linked from the Azure DevOps Marketplace site all still use V1 versions of the SonarCloud tasks.
I got confused with that new release too. Anyway, I updated my steps to V6 and that solved the problem!
The “CodeCoverage.exe is deprecated” issue is resolved after using Task version6. But still the coverage is not getting updated to the Sonar ![]()
Please find below the snippet from log
Found the below lines in log
INFO: ------------- Run sensors on module DataLayerImpl
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
Any help?
This message about JaCoCo coverage should be unrelated. You’re analyzing a .NET project, right?
I think it’s time to create a new thread, with all your details, please.
Thx,
Ann