Overview
Codebelt.Coverlet.MTP is Codebelt's code coverage library for Microsoft Testing Platform. Built on the upstream Coverlet coverage engine, it provides instrumentation, coverage reports, and threshold checks with explicit target-specific assets and dependency groups for netstandard2.0, net10.0, and net11.0. It preserves MTP extension discovery through the coverlet.MTP.dll assembly and the Coverlet.MTP.TestingPlatformBuilderHook registration point.
That choice matters because coverage tooling is not just a runtime detail. It participates in restore, build, instrumentation, and test-host startup for every target framework in a solution. When a repository mixes current .NET TFMs or still keeps a compatibility floor, framework-aligned dependency groups reduce friction that a flattened "latest runtime everywhere" package shape can introduce.
Concepts
Explicit multi-TFM dependency groups
Codebelt.Coverlet.MTP declares separate dependency groups for netstandard2.0, net10.0, and net11.0. The repository's central package versions align Microsoft runtime dependencies to .NET 10 for netstandard2.0 and net10.0, and .NET 11 for net11.0.
The benefit is easy to miss until a test repository starts targeting more than one framework. Coverage extensions run close to the build and test host, so dependency mismatches show up early. Keeping each TFM group explicit lets one package reference fit mixed-target MTP projects without assuming the newest runtime generation should govern every restore graph.
MTP discovery stays compatible
The package changes the NuGet identity to Codebelt.Coverlet.MTP, but it deliberately keeps the implementation assembly name coverlet.MTP.dll. Its build-transitive props still register Coverlet.MTP.TestingPlatformBuilderHook, and its build targets point MTP at the TFM-specific extension assembly under lib\$(TargetFramework).
That is a compatibility choice, not a rewrite for rewrite's sake. Existing Microsoft Testing Platform discovery continues to look like Coverlet, while the package identity and dependency layout reflect the Codebelt-maintained scope.
Coverage collection is split across controller and test-host processes
The integration is shaped around MTP's execution model. CoverletExtensionProvider registers out-of-process controllers that instrument assemblies before the test host starts, plus in-process handlers that flush module tracker data when the session ends. The same package also contributes the --coverlet* command-line surface and configuration-file parsing for testconfig.json or coverlet.mtp.appsettings.json.
That split matters because instrumentation and result emission do not happen at the same point in MTP's lifecycle. The package keeps those responsibilities separate so coverage can be prepared before the test host locks files and finalized after the test session completes.
Usage guidance
Use this family when your tests already run on Microsoft Testing Platform and the repository targets more than one framework, or may need to again later. The explicit multi-TFM packaging is the point: it keeps coverage support aligned to each target instead of forcing one runtime generation through every test project in the solution.
For the console tool, VSTest collector, or MSBuild integration, use the upstream Coverlet project. Codebelt.Coverlet.MTP focuses on Microsoft Testing Platform integration and builds on that project's coverage engine.
