migrate-mstest-v1v2-to-v3
하는 일
이 스킬은 오래된 MSTest 버전 1이나 2를 쓰는 .NET 테스트 프로젝트를 MSTest v3로 업그레이드합니다. 패키지를 업그레이드한 뒤 깨지거나 다르게 동작하는 테스트 팀을 위한 스킬입니다.
사용하는 경우
- ✓테스트 프로젝트가 여전히 MSTest v1의 예전 QualityTools 어셈블리를 참조할 때.
- ✓프로젝트가 MSTest v1이나 v2 NuGet 패키지를 쓰고 v3로 옮겨야 할 때.
- ✓MSTest 패키지를 v3로 올린 뒤 빌드 오류나 DataRow 타입 불일치가 나타날 때.
스킬 링크
https://github.com/dotnet/skills/blob/main/plugins/dotnet-test-migration/skills/migrate-mstest-v1v2-to-v3/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제 테스트 프로젝트가 MSTest v2를 쓰는데 v3로 올리고 싶습니다. 깨지는 것은 모두 고쳐 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트가 먼저 패키지 버전과 프로젝트의 현재 상태를 확인하고, 소스 변경을 적용한 뒤, 업그레이드가 동작하는지 테스트를 실행해 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
MSTest v1/v2 -> v3 Migration
Migrate a test project from MSTest v1 (assembly references) or MSTest v2 (NuGet 1.x-2.x) to MSTest v3. MSTest v3 is not binary compatible with v1/v2 -- libraries compiled against v1/v2 must be recompiled.
First Action
Inspect the supplied workspace and classify v1, v2, partially migrated v3, or already-complete v3 before answering. Do not search the web or answer from memory first. For an edit request, continue through the requested source changes and validation; for an advice request, answer directly after the classification.
When to Use
- Project references
Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll(MSTest v1) - Project uses
MSTest.TestFramework/MSTest.TestAdapterNuGet 1.x or 2.x - Resolving build errors after updating MSTest packages from v1/v2 to v3 -- including when the packages already read 3.x and only the source or settings still need fixing
- Replacing
.testsettingswith.runsettings - Adopting MSTest.Sdk or in-assembly parallel execution
When Not to Use
- Project already on MSTest v3 with no migration-related build errors and no leftover
.testsettings/<LegacySettings>(fully migrated) - Upgrading v3 to v4 -- use
migrate-mstest-v3-to-v4 - Migrating between frameworks (MSTest to xUnit/NUnit)
Boundary Gate
Check package versions before any edit. If all MSTest references are already 3.x,
no v1/v2-to-v3 error is reported, and no .testsettings or <LegacySettings>
remains, state that migration is complete and make no changes. A 3.x package
version alone does not end the migration -- leftover v1/v2-era settings files or
breaking-change errors are still in scope. Do not consolidate working v3 packages
into the metapackage. Run the existing tests only if verification was requested.
This overrides all steps below.
Inputs
| Input | Required | Description |
|---|---|---|
| Project or solution path | No | The .csproj, .sln, or .slnx entry point. Glob the working directory for it; ask only if nothing is found or several test projects make the target ambiguous |
| 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 |
Never open by asking for the project path. A user describing their project in prose is asking a question, not withholding a file -- look on disk first. If there is genuinely no project file, answer for the setup they described rather than replying with only a question.
Open the paths exactly as the search returned them. A glob that answers
./TestProject.csprojmeans the file is there, relative to the working directory -- read it at that path. Do not rebuild it into an absolute path under this skill's own base directory: that directory holdsSKILL.md, not the user's project, so the read fails and the project looks missing when it is not. If a file you just found fails to open, the path you constructed is wrong -- retry with the literal result. Never conclude "there is no project on disk" while a search is still reporting project files, and never scaffold a substitute project from the prose description as a workaround.
Execution Contract
- Skill activation is not a stopping point. Continue with workspace discovery and the requested work in the same task.
- The skill directory contains guidance, not the staged project. Search the current working directory, open the literal paths returned by the search, and retry with another available reader/editor if one tool rejects a valid path.
- Never ask for a path while a glob or directory search can discover it. Ask only after an exhaustive current-workspace search finds no project, or multiple projects make the target genuinely ambiguous.
- Classify the requested deliverable, not isolated verbs: "make the edits", "update this project", or "then build and run" means execute; "what do I need to change?", "what should I expect?", "are the steps the same?", or "show me" means answer, even if the prompt also says upgrade or migrate.
- After changing files, name the detected MSTest version and runner, every file changed, and the exact repaired calls/settings (for example, list each assertion changed to
AreEqual<object>,AreNotEqual<object>, orAreSame<object>). Report the clean test counts. Do not claim VSTest preservation, a build, or passing tests witho
자주 묻는 질문
MSTest v3가 v1이나 v2 라이브러리와 호환되나요?
아니요. v1이나 v2에 맞춰 빌드된 라이브러리는 v3와 함께 쓰려면 다시 컴파일해야 합니다.
이미 v3인 프로젝트도 건드리나요?
남아 있는 마이그레이션 문제, 예를 들어 오래된 설정 파일이 있을 때만 건드립니다.
테스트를 다른 프레임워크로 바꾸나요?
아니요. xUnit이나 NUnit으로 옮기는 것은 이 스킬의 범위 밖입니다.
상세 정보
작성자의 원본 설명
Use this skill before answering or editing whenever an MSTest v1/v2 project is being upgraded or repaired for v3. Triggers include QualityTools assembly references; MSTest.TestFramework/TestAdapter 1.x-2.x; "upgrade to MSTest v3"; comparing v1 and v2 migration paths; choosing MSTest or MSTest.Sdk; CS0411/CS1503 after a v3 package bump; DataRow type mismatch, MSTEST0014, or "Test data doesn't match method parameters"; .testsettings/LegacySettings to .runsettings; timeout changes; and net5.0 or other dropped v3 TFMs. Still use it when packages say 3.x but migration source errors or legacy settin
repo: dotnet/skills
인기도
- GitHub 스타
- 5.8k
- 순위
- #14617
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
create-custom-agent
5.8k에이전트가 자체 도구, 지침, 다른 에이전트로의 핸드오프를 가진 VS Code 커스텀 에이전트 파일을 만들도록 돕습니다.
create-skill
5.8k에이전트가 올바른 이름, 명확한 트리거 설명, 표준을 따르는 SKILL.md 파일로 새 에이전트 스킬을 만들도록 돕습니다.
csharp-scripts
5.8k에이전트가 .NET 명령줄 도구로 작은 C# 프로그램을 전체 프로젝트 없이 단일 파일로 실행하도록 돕습니다.
dotnet-pinvoke
5.8k에이전트가 .NET에서 네이티브 C나 C++ 라이브러리를 올바르게 호출하도록 돕습니다. 시그니처, 문자열 처리, 메모리, 안전 핸들을 다룹니다.
비슷한 스킬
test-driven-development
311k에이전트가 기능이나 수정을 만들기 전에 실패하는 테스트를 먼저 쓰고, 그것을 통과시키는 가장 작은 코드를 작성하도록 가르칩니다.
verification-before-completion
311k에이전트가 작업, 수정, 빌드가 완료되었거나 통과했다고 말하기 전에 실제 점검을 실행하고 결과를 읽도록 가르칩니다.
migrate-to-shoehorn
310k테스트 파일의 위험한 타입 캐스팅을 shoehorn 라이브러리로 바꿔, 테스트가 일부 데이터만 써도 타입 검사를 통과하도록 돕습니다.