Fix build errors and breaking changes after upgrading MSTest from v3 to v4, or plan a complete MSTest v3-to-v4 migration.
SkillScore95Maintained
Automatic
◆Coding pack
Last verified 8/19/2026
What it changes
Passed 21 of 22 test cases with the skill, and 8 of 22 without it.
Without skill36%
With skill95%
Checks it passed that the model alone missed
The response advises against upgrading directly from MSTest v2 to v4.
The response explains that DisableAppDomain defaults to true in MSTest v4.
The response overrides ExecuteAsync returning Task<TestResult[]> instead of Execute.
and 17 more in the full report
13 fixed8 passed either way1 still failing0 broke
Pass-rate lift
+59 pp
Tokens
+238%
Agent turns
0%
Response time
-46%
Model gemini-3.6-flashMeasured 8/19/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 13
Prompt
In MSTest v3 we used `[TestMethod("Slow Database Test")]` on test methods. After upgrading to MSTest v4, this syntax gives a compiler error. What is the updated attribute syntax?
What was checked, without and with the skill
Checked
Without skill
With skill
The response instructs using named parameter syntax DisplayName = "Slow Database Test".
Missed
Passed
case-17 · gemini-3.6-flash · 8/19/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md460 linessingle file
MSTest v3 -> v4 Migration
Migrate a test project from MSTest v3 to MSTest v4. The outcome is a project using MSTest v4 that builds cleanly, passes tests, and accounts for every source-incompatible and behavioral change. MSTest v4 is not binary compatible with MSTest v3 -- any library compiled against v3 must be recompiled against v4.
When to Use
Upgrading MSTest.TestFramework, MSTest.TestAdapter, or MSTest metapackage from 3.x to 4.x
Upgrading MSTest.Sdk from 3.x to 4.x
Fixing build errors after updating to MSTest v4 packages
Resolving behavioral changes in test execution after upgrading to MSTest v4
Updating custom TestMethodAttribute or ConditionBaseAttribute implementations for v4
When Not to Use
The project already uses MSTest v4 and builds cleanly -- migration is done
Upgrading from MSTest v1 or v2 -- use migrate-mstest-v1v2-to-v3 first, then return here
The project does not use MSTest
Migrating between test frameworks (e.g., MSTest to xUnit or NUnit)
Inputs
Input
Required
Description
Project or solution path
Yes
The .csproj, .sln, or .slnx entry point containing MSTest test projects
Build command
No
How to build (e.g., dotnet build, a repo build script). Auto-detect if not provided
Test command
No
How to run tests (e.g., dotnet test). Auto-detect if not provided
Response Guidelines
Always identify the current version first: Before recommending any migration steps, explicitly state the current MSTest version detected in the project (e.g., "Your project uses MSTest v3 (3.8.0)"). This confirms you've read the project files and grounds the migration advice.
Focused fix requests (user has specific compilation errors after upgrading): Address only the relevant breaking changes from Step 3. Always provide concrete fixed code using the user's actual types and method names — show a complete, copy-pasteable code snippet, not just a description of what to change. For custom TestMethodAttribute subclasses, show the full fixed class including CallerInfo propagation to the base constructor. Mention any related analyzer that could have caught this earlier (e.g., MSTEST0006 for ExpectedException). Do not walk through the entire migration workflow.
"What to expect" questions (user asks about breaking changes before upgrading): Present ALL major breaking changes from the Step 3 quick-lookup table -- not just the ones visible in the current code. For each, provide a one-line fix summary. Also mention key behavioral changes from Step 4 (especially TestCase.Id history impact and TreatDiscoveryWarningsAsErrors default). If project code is available, highlight which changes apply directly.
Full migration requests (user wants complete migration): Follow the complete workflow below.
Behavioral/runtime symptom reports (user describes test execution differences without build errors): Match described symptoms to the behavioral changes table in Step 4. Provide targeted, symptom-specific advice. Mention other behavioral changes the user should watch for. Do not walk through source breaking changes unless the user also has build errors.
CI/test-discovery issues (tests not discovered, vstest.console stopped working, CI pipeline failures after upgrading): Focus on 4.5 (MSTest.Sdk defaults to MTP mode, which does not include Microsoft.NET.Test.Sdk -- needed for vstest.console) and 4.4 (TreatDiscoveryWarningsAsErrors). Explain the root cause clearly and give both fix options (add Microsoft.NET.Test.Sdk package or switch to dotnet test). Do not walk through the full migration workflow.
Explanatory questions (user asks "is this a known change?", "what else should I watch out for?"): Explain the relevant changes and advise. Mention related changes the user might encounter next. Do not prescribe a full migration procedure.
Workflow
Commit strategy: Commit at each logical boundary -- after updating packages (Step 2), after resolving source breaking changes (Step 3), after addressing behavioral changes (Step 4). This keeps each commit focused and reviewable.
Design and implement Minimal APIs in ASP.NET Core using handler-first endpoints, route groups, filters, and lightweight composition suited to modern .NET services. USE FOR: building new HTTP APIs in ASP.NET Core; creating lightweight microservices; choosing between Minimal APIs and controllers. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation com