# "CodeCoverage.exe is deprecated" warning in SonarCloudAnalyze@1 task

**URL:** <https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826>\
**Category:** SonarQube Cloud\
**Tags:** sonarqube-cloud, scanner, coverage\
**Created:** [November 22, 2023, 8:45am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826 "2023-11-22T08:45:51Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [January 26, 2024, 2:58pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/23 "2024-01-26T14:58:51Z")

</div>

Hi,

The updated ADO extension should be released in early February.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![marko.troha.ei](https://avatars.discourse-cdn.com/v4/letter/m/c89c15/32.png) [@marko.troha.ei](https://community.sonarsource.com/u/marko.troha.ei)\
**Post date:** [March 27, 2024, 9:22am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/24 "2024-03-27T09:22:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Mikkel](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mikkel/32/10222_2.png) [@Mikkel](https://community.sonarsource.com/u/Mikkel)\
**Post date:** [April 5, 2024, 11:33am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/25 "2024-04-05T11:33:35Z")

</div>

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:

```auto
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:

```auto
- 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

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [April 5, 2024, 12:29pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/26 "2024-04-05T12:29:56Z")

</div>

Hi,

The new version hasn’t been released yet. Unfortunately, I don’t have a timeline for you.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Tejaswini\_Chitnis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tejaswini_chitnis/32/54026_2.png) [@Tejaswini\_Chitnis](https://community.sonarsource.com/u/Tejaswini_Chitnis)\
**Post date:** [May 2, 2024, 10:21am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/29 "2024-05-02T10:21:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [May 2, 2024, 11:57am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/30 "2024-05-02T11:57:35Z")

</div>

Hi @Tejaswini_Chitnis,

Welcome to the community!

Have you tried what the message suggests?

> [@Tejaswini\_Chitnis](#):
>
> Use dotnet-coverage global tool or Microsoft.CodeCoverage.Console instead

&nbsp;  
HTH,  
Ann

---

<div class="post-metadata">

**Author:** ![Tejaswini\_Chitnis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tejaswini_chitnis/32/54026_2.png) [@Tejaswini\_Chitnis](https://community.sonarsource.com/u/Tejaswini_Chitnis)\
**Post date:** [May 2, 2024, 1:16pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/31 "2024-05-02T13:16:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![denis.troller](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/denis.troller/32/49117_2.png) [@denis.troller](https://community.sonarsource.com/u/denis.troller)\
**Post date:** [May 2, 2024, 1:52pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/32 "2024-05-02T13:52:20Z")

</div>

Hi, @Tejaswini_Chitnis,

Have you tried looking at AltCover? It supports .NET framework and we use it as part of our pipelines.

---

<div class="post-metadata">

**Author:** ![denis.troller](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/denis.troller/32/49117_2.png) [@denis.troller](https://community.sonarsource.com/u/denis.troller)\
**Post date:** [May 3, 2024, 7:04am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/34 "2024-05-03T07:04:54Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![denis.troller](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/denis.troller/32/49117_2.png) [@denis.troller](https://community.sonarsource.com/u/denis.troller)\
**Post date:** [May 6, 2024, 10:09am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/37 "2024-05-06T10:09:43Z")

</div>

I have notified someone who should be able to help explain what is going on.

---

<div class="post-metadata">

**Author:** ![Tejaswini\_Chitnis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tejaswini_chitnis/32/54026_2.png) [@Tejaswini\_Chitnis](https://community.sonarsource.com/u/Tejaswini_Chitnis)\
**Post date:** [May 23, 2024, 10:16am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/38 "2024-05-23T10:16:53Z")

</div>

I have setup AltCover but still I seem to be getting the same error -

```auto
"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**."

```

---

<div class="post-metadata">

**Author:** ![Martin\_Strecker](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/martin_strecker/32/32318_2.png) [@Martin\_Strecker](https://community.sonarsource.com/u/Martin_Strecker)\
**Post date:** [May 23, 2024, 2:32pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/39 "2024-05-23T14:32:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tejaswini\_Chitnis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tejaswini_chitnis/32/54026_2.png) [@Tejaswini\_Chitnis](https://community.sonarsource.com/u/Tejaswini_Chitnis)\
**Post date:** [May 27, 2024, 6:25am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/40 "2024-05-27T06:25:05Z")

</div>

Thank you for the response. May I know how we would be notified on the new version release?

---

<div class="post-metadata">

**Author:** ![Lucas\_Paulger](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/lucas_paulger/32/30207_2.png) [@Lucas\_Paulger](https://community.sonarsource.com/u/Lucas_Paulger)\
**Post date:** [June 3, 2024, 7:21am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/44 "2024-06-03T07:21:29Z")

</div>

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

```auto
  - task: SonarCloudPrepare@2
  ...

  - task: SonarCloudAnalyze@2
  ...

  - task: SonarCloudPublish@2
  ...

```

And the SonarQube extension has new v6 tasks

```auto
  - task: SonarQubePrepare@6
  ...

  - task: SonarQubeAnalyze@6
  ...

  - task: SonarQubePublish@6
  ...

```

All the best,

---

<div class="post-metadata">

**Author:** ![Manuel.P](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/manuel.p/32/48061_2.png) [@Manuel.P](https://community.sonarsource.com/u/Manuel.P)\
**Post date:** [June 6, 2024, 7:01am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/45 "2024-06-06T07:01:04Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![GabrielHSFerreira](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/gabrielhsferreira/32/58465_2.png) [@GabrielHSFerreira](https://community.sonarsource.com/u/GabrielHSFerreira)\
**Post date:** [June 6, 2024, 7:02pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/46 "2024-06-06T19:02:07Z")

</div>

I got confused with that new release too. Anyway, I updated my steps to V6 and that solved the problem!

---

<div class="post-metadata">

**Author:** ![Tejaswini\_Chitnis](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/tejaswini_chitnis/32/54026_2.png) [@Tejaswini\_Chitnis](https://community.sonarsource.com/u/Tejaswini_Chitnis)\
**Post date:** [June 21, 2024, 7:50am UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/47 "2024-06-21T07:50:38Z")

</div>

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

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/c/a/ca0deb45ecaecb8a75b0582a3995e540aeb3b20d.png)

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?

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [June 21, 2024, 1:51pm UTC](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826/48 "2024-06-21T13:51:47Z")

</div>

Hi @Tejaswini_Chitnis,

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.

&nbsp;  
Thx,  
Ann

[Previous page](https://community.sonarsource.com/t/codecoverage-exe-is-deprecated-warning-in-sonarcloudanalyze-1-task/104826.md?page=1)
