migrate-mstest-v3-to-v4

Upgrade MSTest v3 test projects to MSTest v4 with build and test validation.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/kierunb/ReliableAppDemo --skill migrate-mstest-v3-to-v4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migrate-mstest-v3-to-v4
Source: https://github.com/kierunb/ReliableAppDemo/tree/main/.github/skills/dotnet-test/skills/migrate-mstest-v3-to-v4
Command: npx skills add https://github.com/kierunb/ReliableAppDemo --skill migrate-mstest-v3-to-v4

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Migrate MSTest v3 test projects to MSTest v4 (latest). Use when user says "upgrade to MSTest v4", "update to latest MSTest", "MSTest 4 migration", or has build errors after updating MSTest packages from 3.x to 4.x.

Core Features & Use Cases

  • Upgrades MSTest package references and targets to supported TFMs (net8.0+; net462; uap10.0 as applicable).
  • Resolves source-breaking changes (Execute → ExecuteAsync, CallerInfo constructor, ClassCleanupBehavior removal, TestContext.Properties changes, and various Assert API updates).
  • Provides a repeatable migration workflow including build and test validation across multiple projects.

Quick Start

Identify MSTest v3 projects, upgrade to MSTest v4, then run build and tests.

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 migrate MSTest v3 test projects to v4?

Migrating MSTest v3 to v4 requires upgrading package references and updating target frameworks to net8.0+, net462, or uap10.0. You must resolve source-breaking changes like switching to ExecuteAsync, updating CallerInfo parameters, and removing ClassCleanupBehavior before validating builds.

Why does my MSTest build fail after updating packages from 3.x to 4.x?

MSTest v4 introduces source-breaking changes including Execute to ExecuteAsync migration, CallerInfo constructor updates, ClassCleanupBehavior removal, and TestContext.Properties adjustments. Upgrading packages without applying these required code modifications causes build errors across your test projects.

What target frameworks are supported for MSTest v4?

MSTest v4 supports net8.0, net9.0, net462, and uap10.0 target framework monikers. Test projects must be updated to these supported TFMs during migration to ensure build compatibility and proper test execution across the .NET ecosystem.

What is the best way to handle MSTest v4 source-breaking changes?

The best way to handle MSTest v4 source-breaking changes is following a structured migration path: update Execute to ExecuteAsync, adjust CallerInfo constructor parameters, remove ClassCleanupBehavior, and update TestContext.Properties, then validate builds across all supported target frameworks.

Can I migrate MSTest v3 tests to v4 for multiple projects at once?

Yes, MSTest v3 to v4 migration provides a repeatable workflow that supports upgrading multiple test projects. The process identifies MSTest v3 projects, applies package upgrades and source-breaking changes, then runs build and test validation across all supported TFMs with structured risk mitigation.