Help required on Dotcover analyse inegration with Azure build pipeline


I am trying to use dotcover analyse for creating code coverage results in my build pipeline in Azure for my solution.It is a microsoft hosted agent used for the CI pipeline and i am using MSTest for testing framework.

I have tried installing the dotcover analyse  extension and use it as a task in the pipeline yml file as shown below. In my solution I have the dotnetCommandLineTools Nuget package added as dependency.

- task: DotCover Analyse@0
    TargetExecutable: 'dotCover.exe'
    TargetWorkingDir: '$(Build.SourcesDirectory)'
    TargetArguments: '*'
    Project Pattern: "*Test.dll"
    ReportType: 'HTML'    
    Output: '$(Build.SourcesDirectory)/CoverageResults'

The DotCoveAnalyse task completes with a message as below which doesn't help to create the code coverage results.

2020-09-29T13:44:38.1877482Z ##[section]Starting: DotCoverAnalyse
2020-09-29T13:44:38.2001028Z ==============================================================================
2020-09-29T13:44:38.2001323Z Task         : Resharper DotCover Analyse Task
2020-09-29T13:44:38.2001619Z Description  : The task creates and runs the Resharper DotCover analyse command line
2020-09-29T13:44:38.2001853Z Version      : 0.3.3
2020-09-29T13:44:38.2002031Z Author       : Christopher Pateman
2020-09-29T13:44:38.2002364Z Help         : [More Information](
2020-09-29T13:44:38.2002745Z ==============================================================================
2020-09-29T13:44:39.6062699Z Downloading Command Line Tools
2020-09-29T13:45:30.1907233Z **** - Create Command Line Script.. Starting - **** 
2020-09-29T13:45:30.2011358Z **** - Setting options.. Starting - **** 
2020-09-29T13:45:30.2052990Z  /TargetExecutable="D:\a\1\s\dotCover.exe"
2020-09-29T13:45:30.2061783Z  /TargetWorkingDir="D:\a\1\s"
2020-09-29T13:45:30.2071656Z  /ReportType="HTML"
2020-09-29T13:45:30.2082344Z  /Output="D:\a\1\s\CoverageResults\CodeAnalyseResults.HTML"
2020-09-29T13:45:30.2091311Z  /TargetArguments=*.Test/bin/Debug/netcoreapp3.1/*Test.dll
2020-09-29T13:45:30.2114813Z  /InheritConsole="True"
2020-09-29T13:45:30.2123602Z  /AnalyseTargetArguments="True"
2020-09-29T13:45:30.2140743Z  /CoreInstructionSet=x64
2020-09-29T13:45:30.2148222Z **** - Setting options.. End - **** 
2020-09-29T13:45:30.2156603Z dotcover analyse /TargetExecutable="D:\a\1\s\dotCover.exe" /TargetWorkingDir="D:\a\1\s" /ReportType="HTML" /Output="D:\a\1\s\CoverageResults\CodeAnalyseResults.HTML" "/TargetArguments=*.Test/bin/Debug/netcoreapp3.1/*Test.dll"  /InheritConsole="True" /AnalyseTargetArguments="True" /CoreInstructionSet=x64
2020-09-29T13:45:30.2163817Z **** - Create Command Line Script.. Starting - **** 
2020-09-29T13:45:30.2171195Z **** - Run Command Line Script.. Starting - **** 
2020-09-29T13:45:30.5302510Z JetBrains dotCover Console Runner 2018.1. Build 112.0.20180414.124358
2020-09-29T13:45:30.5308835Z Copyright (c) 2009–2020 JetBrains s.r.o. All rights reserved.
2020-09-29T13:45:31.5754352Z [JetBrains dotCover] Target executable 'D:\a\1\s\dotCover.exe' doesn't exist. 
2020-09-29T13:45:32.8206833Z **** - Run Command Line Script.. Ending - **** 
2020-09-29T13:45:32.8482654Z ##[section]Finishing: DotCoverAnalyse

I couldn't find any useful documentation to use for configuring the dotcover analyse in azure pipeline. Please provide some pointers or useful links if any

Would appreciate any quick help with this.




1 comment
Comment actions Permalink

Anjitha, apologies for not providing an update on your problem earlier. I see the following error in your message:

[JetBrains dotCover] Target executable 'D:\a\1\s\dotCover.exe' doesn't exist.

I think this is the case. Does dotCover.exe exist at this path?


Please sign in to leave a comment.