Monday, October 26, 2026 4,350 lists 78,101 records on file
List your app or device

  1. Home
  2. Test Coverage Tools
  3. Microsoft Code Coverage

Microsoft Code Coverage

What it is

Microsoft Code Coverage measures how much of a project’s code is exercised by coded tests, including unit tests. It is intended for .NET test projects and other .NET applications. Coverage analysis handles managed CLR and unmanaged native code, with static and dynamic instrumentation. Documented workflows collect coverage through dotnet test or the dotnet-coverage tool. When installed with MSTest, NUnit, or xUnit runners through Microsoft.Testing.Platform.MSBuild, coverage extensions register automatically. The MTP extension can produce coverage, XML, and Cobertura output. Runsettings or dedicated coverage files control output, inclusion and exclusion rules, and instrumentation. Windows, macOS, and multiple Linux distributions are supported, though capabilities vary by operating system, version, and architecture. Dynamic instrumentation on macOS and Linux requires libxml2. Test assemblies are excluded by default unless configured otherwise. The software is free at no cost.

For and against

For

  • Managed and native code coverage
  • Static and dynamic instrumentation
  • Multiple report formats
  • Configurable inclusion and exclusion
  • Windows, macOS, and Linux support

Against

  • Native coverage disabled by default in MTP
  • libxml2 required for some dynamic instrumentation
  • Other operating systems best effort

The verdict

Microsoft Code Coverage provides configurable coverage collection for .NET workflows across major desktop and Linux systems. Review operating-system and dependency requirements before enabling dynamic or native analysis.

Who it suits

It suits developers working on .NET tests or applications who need line, block, assembly, class, or procedure coverage. C# and C++ workflows are listed.

Plans and prices

Microsoft Code Coverage

Free

Closed-source · free to use

Every plan, in full

On the record

Configuration
Coverage settings can control output, inclusion and exclusion rules, and instrumentation options using runsettings or dedicated coverage settings files.github.com · read 4 Oct 2026
Instrumentation
The tooling supports static and dynamic instrumentation.learn.microsoft.com · read 4 Oct 2026
Intended users
The documented workflows cover .NET test projects and other .NET applications that users want to measure for code coverage.github.com · read 4 Oct 2026
Managed and native code
Coverage analysis supports managed CLR code and unmanaged native code; native coverage is disabled by default in the MTP extension.learn.microsoft.com · read 4 Oct 2026
Operating systems
The supported operating systems include Windows, macOS, and multiple Linux distributions, with instrumentation support varying by OS, version, and architecture.github.com · read 4 Oct 2026
Platform limits
Other operating systems are supported on a best-effort basis, and some OS and architecture combinations support static instrumentation only.github.com · read 4 Oct 2026
Purpose
Measures what proportion of a project's code is exercised by coded tests such as unit tests.learn.microsoft.com · read 4 Oct 2026
Report formats
The MTP coverage extension supports coverage, XML, and Cobertura output formats.learn.microsoft.com · read 4 Oct 2026
Runtime dependency
Dynamic instrumentation on macOS and Linux requires the libxml2 package; missing required dependencies may cause an empty coverage report.github.com · read 4 Oct 2026
Security
The repository links to a security policy, but its README describes this repository as documentation and samples for closed-source coverage functionality.github.com · read 4 Oct 2026
Support
The repository invites users to report issues related to the Microsoft.CodeCoverage and dotnet-coverage NuGet packages and Visual Studio code coverage functionality.github.com · read 4 Oct 2026
Test assembly default
MTP excludes test assemblies from coverage by default unless configured otherwise.learn.microsoft.com · read 4 Oct 2026
Test frameworks
With Microsoft.Testing.Platform.MSBuild, coverage extensions are auto-registered when installed with MSTest, NUnit, and xUnit runners.learn.microsoft.com · read 4 Oct 2026
Usage
The repository documents collecting coverage for .NET tests with dotnet test and for other .NET applications with the dotnet-coverage tool.github.com · read 4 Oct 2026

Alternatives to Microsoft Code Coverage

Every alternative, ranked