migrate-mstest-v3-to-v4

Migrates MSTest v3 projects to v4 by fixing breaking changes and updating test frameworks.

1|Updated May 21, 2026
One-click install
npx skills add https://github.com/1k-off/umbraco-observability-playground --skill migrate-mstest-v3-to-v4-1k-off
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-mstest-v3-to-v4
Source: https://github.com/1k-off/umbraco-observability-playground/tree/main/.agents/skills/migrate-mstest-v3-to-v4
Command: npx skills add https://github.com/1k-off/umbraco-observability-playground --skill migrate-mstest-v3-to-v4-1k-off

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

MSTest v3 to v4 upgrades commonly break test projects with compile errors and subtle behavior changes, leaving tests undiscovered or failing to run after updating packages.

Core Features & Use Cases

  • Fixs compile-time breaking changes: Converts removed/renamed MSTest APIs and attributes (e.g., Execute -> ExecuteAsync, ExpectedException -> Assert.ThrowsExactly, TestContext.Properties.Contains -> ContainsKey).
  • Handles migration constraints: Updates target frameworks to the ones supported by MSTest v4 and adjusts custom attributes that depend on MSTest internals.
  • Addresses common runtime/discovery symptoms: Covers behavior changes like stricter discovery (TreatDiscoveryWarningsAsErrors) and lifecycle-scoped access for TestContext properties.

Quick Start

Ask the AI to migrate your solution from MSTest v3 to MSTest v4 by applying the specific breaking-change fixes for your build errors and then verify tests with dotnet test.

Frequently Asked Questions about migrate-mstest-v3-to-v4

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

FAQPage Schema
How do I fix MSTest v3 to v4 migration compile errors?

MSTest v3 to v4 migration compile errors are fixed by converting removed and renamed APIs, such as updating Execute to ExecuteAsync and ExpectedException to Assert.ThrowsExactly.

Why are my MSTest tests failing discovery after upgrading to v4?

MSTest tests fail discovery after upgrading to v4 due to stricter behavior changes like TreatDiscoveryWarningsAsErrors, requiring code-level fixes to resolve the newly enforced source-breaking constraints.

How do I resolve MSTest v4 runtime lifecycle exceptions?

MSTest v4 runtime lifecycle exceptions are resolved by applying code-level fixes for known breaking patterns, including adjusting lifecycle-scoped access for TestContext properties during the v3 to v4 migration.

What unsupported frameworks need updating when migrating MSTest to v4?

Migrating MSTest to v4 requires updating unsupported test target frameworks to the specific versions supported by MSTest v4 to prevent compilation and test execution failures.

Does MSTest v4 migration require updating runsettings behavior?

MSTest v4 migration requires updating runsettings behavior when needed to address stricter discovery warnings and ensure dotnet test validates the migrated test execution successfully.

How do I handle custom attributes depending on MSTest internals during v4 migration?

MSTest v4 migration handles custom attributes by adjusting those that depend on MSTest internals, resolving source-breaking API changes to ensure successful dotnet build and test validation.