Agent skill
dotnet-enable-testing-platform
Enables the Microsoft Testing Platform runner in global.json. Use when the user wants to enable or migrate to the new .NET testing platform.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/dotnet-enable-testing-platform
Metadata
Additional technical details for this skill
- author
- Im5tu
- version
- 1.0
- repositoryUrl
- https://github.com/im5tu/dotnet-skills
SKILL.md
Enable the Microsoft Testing Platform runner for a .NET solution by configuring global.json.
The Microsoft Testing Platform is a modern, extensible test runner that provides improved performance, better diagnostics, and native support for parallel test execution.
Steps
-
Find the solution file (*.sln) in the current directory
- If no .sln found, warn and stop
-
Check for existing global.json in the solution root directory
- Read contents if file exists
-
Create or update global.json:
- If file does not exist, create it:
json
{ "test": { "runner": "Microsoft.Testing.Platform" } } - If file exists, merge the
testsection while preserving all other content:- Parse existing JSON
- Add or update the
test.runnerproperty - Preserve
sdk,msbuild-sdks, and any other existing sections
- If file does not exist, create it:
-
Verify JSON validity:
bashdotnet build dotnet test -
If build fails, report the error and ask user how to proceed
-
Report results:
- Confirm global.json was created or updated
- Show the final global.json content
- Confirm build status
- Confirm tests run successfully
Example global.json Configurations
Minimal (new file):
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Merged (existing file with SDK pinning):
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestMinor"
},
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
Error Handling
- If no .sln found: warn and stop
- If global.json exists but is invalid JSON: report error and ask user
- If build fails after update: show errors and ask user how to proceed
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?