Write, run, or repair .NET tests that use MSTest.
Coverlet for .NET
Use the open-source free `coverlet` toolchain for .NET code coverage. Use when a repo needs line and branch coverage, collector versus MSBuild driver selection, or CI-safe coverage commands.
Trigger On
- the repo uses or wants
coverlet - CI needs line or branch coverage for .NET tests
- the team needs to choose between
coverlet.collector,coverlet.msbuild, orcoverlet.console
Workflow
- Choose the driver deliberately:
- coverlet.collector for VSTest dotnet test --collect - coverlet.msbuild for MSBuild property-driven runs - coverlet.console for standalone scenarios
- Add coverage packages only to test projects.
- Do not mix
coverlet.collectorandcoverlet.msbuildin the same test project. - Pair raw coverage collection with
ReportGeneratoronly when humans need rendered reports.
Deliver
- explicit coverage driver selection
- reproducible coverage commands for local and CI runs
Validate
- coverage driver matches the runner model
- coverage files are stable and consumable by downstream reporting
Load References
references/commands.mdreferences/patterns.mdreferences/coverlet.md
Related skills
Write, run, or repair .NET tests that use NUnit.
Automated, project-wide code coverage and CRAP (Change Risk Anti-Patterns) score analysis for .NET projects with existing unit tests.
Related agents
.NET Review
Review orchestration agent for .NET changes across bugs, regressions, analyzers, architecture, tests, and maintainability.
Also works: dotnet agents install review
.NET Build
Build-focused orchestration agent for .NET restore, build, test, packaging, CI failures, diagnostics, and environment drift.
Also works: dotnet agents install build