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
dotnet/skills/plugins/dotnet-test/skills/mtp-hot-reload/SKILL.md
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
Decision brief
Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/dotnet/skills --skill "plugins/dotnet-test/skills/mtp-hot-reload"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
Hot reload requires MTP. It does not work with VSTest.
Hot reload requires MTP. It does not work with VSTest.
First inspect the effective package references. If Microsoft.Testing.Extensions.HotReload is already installed, preserve its version and skip this step. Otherwise install it:
Hot reload is activated by setting the TESTINGPLATFORMHOTRELOADENABLED environment variable to 1.
Run the test project directly (not through dotnet test) to use hot reload in console mode:
Permission review
The documentation asks the agent to run terminal commands or scripts.
return one `dotnet run --project <path>` command and one sentence explainingThe documentation asks the agent to run terminal commands or scripts.
properties/packages, or return a `dotnet run` hot-reload command. Never turn aEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 93/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 5,277 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.
run-tests)| Input | Required | Description |
|---|---|---|
| Test project path | No | Path to the test project (.csproj). Defaults to current directory. |
| Failing test name or filter | No | Specific test(s) to iterate on |
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.--filter for
xUnit v3 --filter-method or TUnit --treenode-filter.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.
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.
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"
}
}
}
}
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:
| Framework | Filter syntax |
|---|---|
| MSTest | dotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName" |
| NUnit | dotnet run --project <path> -- --filter "FullyQualifiedName~TestMethodName" |
| xUnit v3 | dotnet run --project <path> -- --filter-method "*TestMethodName" |
| TUnit | dotnet run --project <path> -- --treenode-filter "/*/*/ClassName/TestMethodName" |
The test host will start, run the tests, and remain running waiting for code changes.
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.
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:
Ctrl+C.dotnet build <project-path>.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 --.
Once all tests pass:
run-tests when the user requests an exact one-shot validation command,
flags, filter, TRX, or dumpTESTINGPLATFORM_HOTRELOAD_ENABLED from the environment or keep launchSettings.json for future useMicrosoft.Testing.Extensions.HotReload package is installedTESTINGPLATFORM_HOTRELOAD_ENABLED environment variable is set to 1| Pitfall | Solution |
|---|---|
Using dotnet test instead of dotnet run | Hot reload requires dotnet run --project <path> to run the test host directly in console mode |
| Project uses VSTest, not MTP | Do not mutate it. Offer dotnet watch --project <path> test as a rebuild/rerun fallback or a separate explicit migration |
| Forgetting to set the environment variable | Set TESTINGPLATFORM_HOTRELOAD_ENABLED=1 before running |
| Expecting Test Explorer integration | Console 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
Set up and use a long-lived Microsoft Testing Platform host that applies code edits and automatically reruns tests.
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.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
garrytan/gbrain
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.
alirezarezvani/claude-skills
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
dotnet/skills
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
vipshop/cache-dit
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.