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.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "dotnet-enable-testing-platform" with this command: npx skills add im5tu/dotnet-skills/im5tu-dotnet-skills-dotnet-enable-testing-platform

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

  1. Find the solution file (*.sln) in the current directory

    • If no .sln found, warn and stop
  2. Check for existing global.json in the solution root directory

    • Read contents if file exists
  3. Create or update global.json:

    • If file does not exist, create it:
      {
        "test": {
          "runner": "Microsoft.Testing.Platform"
        }
      }
      
    • If file exists, merge the test section while preserving all other content:
      • Parse existing JSON
      • Add or update the test.runner property
      • Preserve sdk, msbuild-sdks, and any other existing sections
  4. Verify JSON validity:

    dotnet build
    dotnet test
    
  5. If build fails, report the error and ask user how to proceed

  6. 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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

dotnet-enable-autocomplete

No summary provided by upstream source.

Repository SourceNeeds Review
General

modern-csharp-coding-standards

No summary provided by upstream source.

Repository SourceNeeds Review
General

efcore-patterns

No summary provided by upstream source.

Repository SourceNeeds Review
General

csharp-concurrency-patterns

No summary provided by upstream source.

Repository SourceNeeds Review