mcaf-dotnet-xunit

Manage .NET xUnit tests with VSTest and Microsoft.Testing.Platform.

4|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-xunit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcaf-dotnet-xunit
Source: https://github.com/managedcode/MCPGateway/tree/main/.codex/skills/mcaf-dotnet-xunit
Command: npx skills add https://github.com/managedcode/MCPGateway --skill mcaf-dotnet-xunit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers write, run, and repair .NET tests using the xUnit framework, especially when they are unsure about the correct CLI commands, package configurations, or runner setups for VSTest or Microsoft.Testing.Platform.

Core Features & Use Cases

  • xUnit Detection: Identifies the specific version of xUnit and the active test runner (VSTest or Microsoft.Testing.Platform).
  • Test Execution Guidance: Provides correct commands for running tests, including filtering by project, class, or method.
  • Bootstrap Missing Setup: Assists in adding necessary xUnit packages and configuring AGENTS.md if xUnit is not yet set up.
  • Use Case: A developer needs to add a new regression test to a .NET project that uses xUnit v3 and the Microsoft.Testing.Platform runner. This Skill will guide them on the correct packages to add, the command to run the test, and how to ensure CI compatibility.

Quick Start

Use the mcaf-dotnet-xunit skill to add a new xUnit test to the 'MyProject.Tests' project.

Frequently Asked Questions about mcaf-dotnet-xunit

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

FAQPage Schema
How do I run xUnit tests in a .NET project using Microsoft.Testing.Platform?

To configure xUnit tests with Microsoft.Testing.Platform, you must install the correct packages and set up the runner. This Skill identifies the active test runner and guides you through package installation and configuration for VSTest or Microsoft.Testing.Platform.

What's the best way to add xUnit packages to a .NET project that has no test setup?

The best way to add xUnit packages to a .NET project is to bootstrap the missing setup. This Skill assists in adding necessary xUnit packages for v2 or v3 and configures the project files to ensure proper test runner detection and CI compatibility.

Does xUnit v3 work with VSTest and Microsoft.Testing.Platform runners?

Yes, xUnit v3 works with both VSTest and Microsoft.Testing.Platform runners. This Skill detects the specific version of xUnit and the active test runner to provide accurate configuration and execution guidance for your .NET testing setup.

How do I fix a broken xUnit test in a .NET project?

To fix a broken xUnit test in a .NET project, you need proper debugging and repair guidance. This Skill addresses scenarios requiring test addition, repair, or debugging within xUnit-enabled .NET projects to resolve execution errors.

Why are my xUnit tests not showing up in the VSTest runner?

xUnit tests may not show up in the VSTest runner due to missing packages or incorrect runner configuration. This Skill identifies your xUnit version and active runner, bootstrapping the necessary setup to ensure proper test discovery.