dotCover 2025.3 Help

Command Reference

The dotCover command-line tool provides the following commands:

  • cover - Perform coverage analysis of the specified application, test project, or any dotnet command.

  • merge - Merges several coverage snapshots.

  • report - Creates a report for the specified snapshot.

  • version - Writes dotCover version info to the specified file.

  • help - Shows command-line tool help.

You can learn everything about each command right in the console by typing help followed by the command name. All commands (including help) have corresponding shortcuts. For instance, to get information about the analyse command, you can type:

dotCover help cover

cover

dotCover cover — Run coverage analysis on a specified application or test project ================================================================================= Usage: dotCover cover <options> [-- <target arguments>] dotCover cover @<args-file> [@<args-file2> ...] [<options>] Description: Runs coverage analysis for the specified executable, .NET test project, or any dotnet command. If no executable is specified, dotCover will try to automatically run 'dotnet'. Options: --target-executable <path> Path to the application or test runner to analyze. If omitted, dotCover will auto-detect the 'dotnet' CLI. --target-arguments <args> Command-line arguments to pass to the target executable. You can omit the parameter and specify them after a double dash: -- arg1 arg2 --target-working-directory <path> Application working directory. By default, it's the target’s directory. --snapshot-output <path> Path to save the raw coverage snapshot ('.dcvr'). Autogenerated if omitted. Filter options: --exclude-assemblies <list> Comma-separated list of assembly names to exclude from analysis. Wildcards (*) allowed, e.g., *.Tests You can specify this option multiple times; all values will be combined. --exclude-attributes <list> Comma-separated list of fully qualified attribute names. Code marked with these will be excluded, e.g., System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute Wildcards (*) allowed. You can specify this option multiple times; all values will be combined. --exclude-processes <list> Comma-separated list of process names to ignore during analysis. Wildcards (*) allowed. You can specify this option multiple times; all values will be combined. Report options: --json-report-output <path> Paths to save formatted JSON report. --json-report-covering-tests-scope <level> Granularity for including covering tests in JSON reports: [none|assembly|type|method|statement] --xml-report-output <path> Paths to save formatted XML report. --xml-report-covering-tests-scope <level> Granularity for including covering tests in XML reports: [none|assembly|type|method|statement] Advanced options: --temporary-directory <path> Directory for temporary files. By default, it's the system temp folder. --use-api Control the coverage session using the profiler API. --no-ngen Disable loading of NGen images during coverage. --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover cover --json-report-output report.json -- test dotCover cover @args.txt

merge

dotCover merge — Combine multiple coverage snapshots into one ============================================================= Usage: dotCover merge <options> dotCover merge @<args-file> [@<args-file2> ...] [<options>] Description: Merges two or more coverage snapshots (.dcvr files) into a single snapshot. This is useful when coverage was collected in separate test runs (e.g., with different test frameworks or target platforms). Options: --snapshot-source <list> Required. Comma-separated list of source snapshot files to merge. --snapshot-output <path> Path to save the merged snapshot (.dcvr). If omitted, a file name will be generated automatically. Advanced options: --temporary-directory <path> Directory for temporary files. By default, it's the system temp folder. --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover merge --snapshot-source run1.dcvr,run2.dcvr --snapshot-output merged.dcvr dotCover merge @merge-args.txt

report

dotCover report — Generate a coverage report from a snapshot ============================================================ Usage: dotCover report <options> dotCover report @<args-file> [@<args-file2> ...] [<options>] Description: Creates a formatted report (XML or JSON) from a coverage snapshot (.dcvr). Options: --snapshot-source <path> Required. Path to the coverage snapshot file (.dcvr). --json-report-output <path> Paths to save formatted JSON report. --json-report-covering-tests-scope <level> Granularity for including covering tests in JSON reports: [none|assembly|type|method|statement] --xml-report-output <path> Paths to save formatted XML report. --xml-report-covering-tests-scope <level> Granularity for including covering tests in XML reports: [none|assembly|type|method|statement] Advanced options: --log-file <path> Enable logging and specify the path to the log file. Notes: - You can use response files with the '@<args-file>' syntax to simplify command lines. Examples: dotCover report --snapshot-source merged.dcvr --xml-report-output report.xml dotCover report @report-args.txt

version

dotCover version — Write the current dotCover version to a file =============================================================== Usage: dotCover version [options] Description: Write the current version to a specified file. Options: --text-output <path> Path to save the version information as plain text. Examples: dotCover version dotCover version --text-output version.txt

help

dotCover help — Show help for dotCover CLI commands =================================================== Usage: dotCover help [<command>] Description: Displays detailed help for a specific command. Available commands: cover Run coverage analysis on an application or test project merge Combine multiple coverage snapshots into one report Generate a coverage report from a snapshot version Display the current dotCover version help Show help on commands Examples: dotCover help cover
25 July 2025