Source profileQuality 93/100Review permissions

dotnet/skills/plugins/dotnet-test/skills/mtp-hot-reload/SKILL.md

mtp-hot-reload

Set up or recover MTP hot reload for a long-lived edit/re-run loop. Use for "hot reload tests", "dotnet run or dotnet test for hot reload", a host that keeps running, unsupported/rude edits, or a watch-based VSTest fallback. Covers setup, run/watch, restarts, filters, and the VSTest no-mutation fallback. Never mutate VSTest for hot reload. For one-time runs, exact commands, filter errors, TRX/dumps, or merely a failing test, use run-tests. Excludes writing/debugging tests, CI, and Test Explorer

Source repository stars
5,277
Declared platforms
0
Static risk flags
1
Last source update
2026-08-28
Source checked
2026-08-28

Decision brief

What it does: where it fits

Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.

Best for

  • User explicitly asks for test hot reload
  • User wants a host to stay running and automatically rerun after repeated edits
  • User needs to set up MTP hot reload in their project

Not for

  • User needs to write new tests from scratch (use general coding assistance)
  • User needs to diagnose why a test is failing (use diagnostic skills)

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/dotnet/skills --skill "plugins/dotnet-test/skills/mtp-hot-reload"
Safe inspection promptEditorial

Inspect the Agent Skill "mtp-hot-reload" from https://github.com/dotnet/skills/blob/2b9056bd9152490cc698c5b3e61c9f9a1c135776/plugins/dotnet-test/skills/mtp-hot-reload/SKILL.md at commit 2b9056bd9152490cc698c5b3e61c9f9a1c135776. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    Hot reload requires MTP. It does not work with VSTest.

    Hot reload requires MTP. It does not work with VSTest.Follow the complete evaluated-property procedure in the platform-detection skill. Read imported props and package versions as well as the project file. Do this before installing packages, editing files, or returning an…Hard stop for VSTest: report that MTP hot reload is unavailable for the project as configured and stop the MTP setup path. Do not install the extension, create launchSettings.json, set the environment variable, change r…
  2. 02

    Step 1: Detect the platform before changing anything

    Hot reload requires MTP. It does not work with VSTest.

    Hot reload requires MTP. It does not work with VSTest.Follow the complete evaluated-property procedure in the platform-detection skill. Read imported props and package versions as well as the project file. Do this before installing packages, editing files, or returning an…Hard stop for VSTest: report that MTP hot reload is unavailable for the project as configured and stop the MTP setup path. Do not install the extension, create launchSettings.json, set the environment variable, change r…
  3. 03

    Step 2: Add the hot reload NuGet package

    First inspect the effective package references. If Microsoft.Testing.Extensions.HotReload is already installed, preserve its version and skip this step. Otherwise install it:

    First inspect the effective package references. If Microsoft.Testing.Extensions.HotReload is already installed, preserve its version and skip this step. Otherwise install it:Note: When using Microsoft.Testing.Platform.MSBuild (included transitively by MSTest, NUnit, and xUnit runners), the extension is auto-registered when you install its NuGet package -- no code changes needed.
  4. 04

    Step 3: Enable hot reload

    Hot reload is activated by setting the TESTINGPLATFORMHOTRELOADENABLED environment variable to 1.

    Hot reload is activated by setting the TESTINGPLATFORMHOTRELOADENABLED environment variable to 1.Option A -- Set it in the shell before running tests:
  5. 05

    Step 4: Run the tests with hot reload

    Run the test project directly (not through dotnet test) to use hot reload in console mode:

    Run the test project directly (not through dotnet test) to use hot reload in console mode:To filter to specific failing tests, pass the filter after --. The syntax depends on the test framework -- see the filter-syntax skill for full details. Quick examples:The test host will start, run the tests, and remain running waiting for code changes.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 31

The documentation asks the agent to run terminal commands or scripts.

return one `dotnet run --project <path>` command and one sentence explaining

Runs scripts

medium · line 55

The documentation asks the agent to run terminal commands or scripts.

properties/packages, or return a `dotnet run` hot-reload command. Never turn a

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars5,277SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
dotnet/skills
Skill path
plugins/dotnet-test/skills/mtp-hot-reload/SKILL.md
Commit
2b9056bd9152490cc698c5b3e61c9f9a1c135776
License
MIT
Collected
2026-08-28
Default branch
main
View the original SKILL.md

MTP Hot Reload for Iterative Test Fixing

Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.

When to Use

  • User explicitly asks for test hot reload
  • User wants a host to stay running and automatically rerun after repeated edits
  • User needs to set up MTP hot reload in their project

When Not to Use

  • User needs to write new tests from scratch (use general coding assistance)
  • User needs to diagnose why a test is failing (use diagnostic skills)
  • User wants Visual Studio Test Explorer hot reload (different feature, built into VS)
  • User wants one normal run without rebuilding (use run-tests)
  • User needs CI/CD pipeline configuration

Inputs

InputRequiredDescription
Test project pathNoPath to the test project (.csproj). Defaults to current directory.
Failing test name or filterNoSpecific test(s) to iterate on

Response sizing

  • If setup is already complete and the user asks only which command to use, return one dotnet run --project <path> command and one sentence explaining that it starts the persistent host. Do not repeat package, launch profile, or rude-edit guidance.
  • If the package is already installed, show only the remaining enable-and-run steps. Do not suggest reinstalling it or add optional persistence/recovery paths unless requested.
  • For a named test, identify the framework and return one runnable command with that framework's filter syntax. Never substitute MSTest/NUnit --filter for xUnit v3 --filter-method or TUnit --treenode-filter.

Workflow

Step 1: Detect the platform before changing anything

Hot reload requires MTP. It does not work with VSTest.

Follow the complete evaluated-property procedure in the platform-detection skill. Read imported props and package versions as well as the project file. Do this before installing packages, editing files, or returning an MTP launch command.

Hard stop for VSTest: report that MTP hot reload is unavailable for the project as configured and stop the MTP setup path. Do not install the extension, create launchSettings.json, set the environment variable, change runner properties/packages, or return a dotnet run hot-reload command. Never turn a setup request into an implicit VSTest-to-MTP migration.

Offer one valid non-MTP fallback that preserves the project:

dotnet watch --project <project-path> test

This rebuilds and reruns the existing VSTest project when files change; it is not MTP hot reload. Offer an explicit migration as a separate option, but do not perform it unless the user asks. Exact one-shot test commands remain owned by run-tests.

Step 2: Add the hot reload NuGet package

First inspect the effective package references. If Microsoft.Testing.Extensions.HotReload is already installed, preserve its version and skip this step. Otherwise install it:

dotnet add <project-path> package Microsoft.Testing.Extensions.HotReload

Note: When using Microsoft.Testing.Platform.MSBuild (included transitively by MSTest, NUnit, and xUnit runners), the extension is auto-registered when you install its NuGet package -- no code changes needed.

Step 3: Enable hot reload

Hot reload is activated by setting the TESTINGPLATFORM_HOTRELOAD_ENABLED environment variable to 1.

Option A -- Set it in the shell before running tests:

# PowerShell
$env:TESTINGPLATFORM_HOTRELOAD_ENABLED = "1"

# bash/zsh
export TESTINGPLATFORM_HOTRELOAD_ENABLED=1

Option B -- Add it to launchSettings.json (recommended for repeatable use):

Create or update Properties/launchSettings.json in the test project:

{
  "profiles": {
    "<ProjectName>": {
      "commandName": "Project",
      "environmentVariables": {
        "TESTINGPLATFORM_HOTRELOAD_ENABLED": "1"
      }
    }
  }
}

Step 4: Run the tests with hot reload

Run the test project directly (not through dotnet test) to use hot reload in console mode:

dotnet run --project <project-path>

To filter to specific failing tests, pass the filter after --. The syntax depends on the test framework -- see the filter-syntax skill for full details. Quick examples:

FrameworkFilter syntax
MSTestdotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName"
NUnitdotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName"
xUnit v3dotnet run --project <path> -- --filter-method "*TestMethodName"
TUnitdotnet run --project <path> -- --treenode-filter "/*/*/ClassName/TestMethodName"

The test host will start, run the tests, and remain running waiting for code changes.

Step 5: Iterate on the fix

  1. Edit the source code (test code or production code) in your editor
  2. The test host detects the changes and re-runs the affected tests automatically
  3. Review the updated results in the console
  4. Repeat until all targeted tests pass

Important: Hot reload currently works in console mode only. There is no support for hot reload in Test Explorer for Visual Studio or Visual Studio Code.

Unsupported edits and rude edits

Method-signature changes, new types, and other unsupported edits cannot be applied to the active process. Never imply that the stale host picked them up.

For a directly launched MTP host:

  1. Preserve the exact command, profile, environment, filter, and arguments that started the current host.
  2. Stop it with Ctrl+C.
  3. Rebuild the same project: dotnet build <project-path>.
  4. Rerun the same original host command. Do not replace an unknown existing invocation with a generic dotnet run command.

If repeated unsupported edits are expected, offer a watch-managed restart fallback:

# PowerShell
$env:TESTINGPLATFORM_HOTRELOAD_ENABLED = "1"
$env:DOTNET_WATCH_RESTART_ON_RUDE_EDIT = "1"
dotnet watch --project <project-path> run -- <existing-MTP-arguments>

dotnet watch restarts the process when a rude edit cannot be applied. Without the auto-restart variable, accept the restart prompt or press Ctrl+R. Preserve any existing test filter after --.

Step 6: Finalize

Once all tests pass:

  1. Stop the test host (Ctrl+C)
  2. Use run-tests when the user requests an exact one-shot validation command, flags, filter, TRX, or dump
  3. Optionally remove TESTINGPLATFORM_HOTRELOAD_ENABLED from the environment or keep launchSettings.json for future use

Validation

  • Project uses Microsoft Testing Platform (not VSTest)
  • Microsoft.Testing.Extensions.HotReload package is installed
  • TESTINGPLATFORM_HOTRELOAD_ENABLED environment variable is set to 1
  • Tests run and the host remains active waiting for changes
  • Code changes are picked up without manual restart

Common Pitfalls

PitfallSolution
Using dotnet test instead of dotnet runHot reload requires dotnet run --project <path> to run the test host directly in console mode
Project uses VSTest, not MTPDo not mutate it. Offer dotnet watch --project <path> test as a rebuild/rerun fallback or a separate explicit migration
Forgetting to set the environment variableSet TESTINGPLATFORM_HOTRELOAD_ENABLED=1 before running
Expecting Test Explorer integrationConsole mode only -- no VS/VS Code Test Explorer support
Making unsupported code changes (rude edits)Stop, rebuild, and rerun the same host invocation, or use dotnet watch with restart-on-rude-edit behavior

Frequently asked questions

What to verify before installation and use

What does the mtp-hot-reload source document cover?

Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.

How do I install mtp-hot-reload?

The source record exposes this install command: npx skills add https://github.com/dotnet/skills --skill "plugins/dotnet-test/skills/mtp-hot-reload". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10029,236

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10025,136

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,277

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing

Computed 991,260

vipshop/cache-dit

cache-dit-model-integration

High-level guide for integrating a new DiT model into cache-dit: Cache (BlockAdapter/ForwardPattern), Context Parallelism, Tensor Parallelism, Text Encoder Parallelism (TE-P), VAE Parallelism (VAE-P), generate CLI, installation, testing workflow, and detailed references. Use when adding support for a new diffusion transformer model in cache-dit.