dotnet-mtp

Enforce explicit MTP CLI flags for dotnet test with treenode-filter syntax.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/mdementyev/my-claude-harness --skill dotnet-mtp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-mtp
Source: https://github.com/mdementyev/my-claude-harness/tree/main/skills/dotnet-mtp
Command: npx skills add https://github.com/mdementyev/my-claude-harness --skill dotnet-mtp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Microsoft Testing Platform (MTP) replaces VSTest as the test runner for modern .NET test frameworks (TUnit, MSTest 3.x+). It requires explicit CLI flags for solutions and projects, and uses a non-obvious treenode-filter syntax for selecting tests. It also handles code coverage collection with the --coverage flag and guidance on avoiding VSTest's legacy --collect mechanism.

Core Features & Use Cases

  • Explicit CLI usage for running tests: use --solution for solutions and --project for projects.
  • Advanced test filtering with --treenode-filter, including the four-level path pattern (Assembly/Namespace/Class/Method) and logical operators.
  • Coverage-aware testing: enable and configure code coverage collection via --coverage and related options, with recommended best practices.

Quick Start

Run dotnet test with explicit --solution or --project flags and a valid --treenode-filter expression to target tests.

Frequently Asked Questions about dotnet-mtp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run dotnet test for a specific project using Microsoft Testing Platform?

Microsoft Testing Platform requires explicit flags to run dotnet test for a specific project, enforcing the use of the --project flag with your project path. This ensures reliable project-level test execution across modern .NET frameworks like TUnit and MSTest.

What is the correct syntax for the treenode-filter in .NET tests?

The treenode-filter in Microsoft Testing Platform uses a four-level path pattern of Assembly, Namespace, Class, and Method. You apply logical operators within the --treenode-filter expression to precisely target specific tests for execution.

Does MTP work with both TUnit and MSTest frameworks?

Microsoft Testing Platform works with both TUnit and MSTest 3.x+ scenarios as the modern test runner replacing VSTest. It supports solution-level and project-level runs with explicit CLI flags and advanced test filtering across both frameworks.

How do I collect code coverage with dotnet test in MTP?

To collect code coverage in Microsoft Testing Platform, you enable and configure it via the explicit --coverage flag and related options. Avoid VSTest's legacy --collect mechanism and follow MTP's recommended best practices for reliable coverage data.

Why does my dotnet test command fail when running a solution in MTP?

Your dotnet test command fails because Microsoft Testing Platform enforces explicit CLI flags for solutions, requiring the --solution flag instead of relying on implicit discovery. Applying explicit --solution usage ensures correct solution-level execution.