Skip to content

Replace SettingsMigrator tool with a Copilot skill and remove all code#15537

Draft
nohwnd wants to merge 2 commits intomicrosoft:mainfrom
nohwnd:deprecate-settings-migrator
Draft

Replace SettingsMigrator tool with a Copilot skill and remove all code#15537
nohwnd wants to merge 2 commits intomicrosoft:mainfrom
nohwnd:deprecate-settings-migrator

Conversation

@nohwnd
Copy link
Member

@nohwnd nohwnd commented Mar 20, 2026

Summary

Replaces the \SettingsMigrator.exe\ tool with a Copilot skill that documents the complete .testsettings\ → .runsettings\ migration process, then removes all source code and tests.

Motivation

The SettingsMigrator is a .NET Framework-only console app (~420 lines of XML transformation code, 14 localization files, 16 unit tests). Its functionality is straightforward XML node mapping that can be documented as step-by-step instructions usable by both AI agents and humans.

Changes

Added

  • *.github/skills/settings-migration/SKILL.md* — Complete migration guide including:
    • Step-by-step instructions for both .testsettings\ and embedded .testsettings\ in .runsettings\
    • XML mapping table (which XPath maps to which RunSettings node)
    • Rules for LegacySettings, DataCollectors, TestSessionTimeout, WebTestRunConfiguration
    • Warning about unsupported attributes
    • Full before/after XML example

Removed (~2000 lines)

  • \src/SettingsMigrator/\ — all source code (Migrator.cs, PathResolver.cs, Program.cs, TestSettingsNodes.cs, resources, 14 xlf localization files)
  • \ est/SettingsMigrator.UnitTests/\ — all tests and test data files
  • References from \TestPlatform.sln, \Microsoft.TestPlatform.nuspec, \Microsoft.TestPlatform.csproj, \V2.CLI.csproj, \�erify-nupkgs.ps1\

Verification

  • Solution builds successfully after removal
  • No remaining references to SettingsMigrator in build/packaging files

The SettingsMigrator.exe tool converts legacy .testsettings files to
.runsettings format. This replaces it with a Copilot skill that documents
the complete migration process step-by-step, usable both by AI agents and
humans following manual steps.

Changes:
- New .github/skills/settings-migration/SKILL.md with complete migration
  guide including XML mapping rules, examples, and edge cases
- Removed src/SettingsMigrator/ (source, resources, 14 localization files)
- Removed test/SettingsMigrator.UnitTests/ (16 unit tests, test data)
- Removed from TestPlatform.sln, Microsoft.TestPlatform.nuspec,
  Microsoft.TestPlatform.csproj, V2.CLI.csproj, verify-nupkgs.ps1

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 20, 2026 10:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR deprecates and removes the existing SettingsMigrator .NET tool (and its unit tests/localization assets) and replaces it with a Copilot “skill” document that describes the .testsettings.runsettings migration steps.

Changes:

  • Added a migration skill document that captures the XML node/attribute mapping rules and examples.
  • Removed the SettingsMigrator tool project, resources (including localization), and unit tests.
  • Removed SettingsMigrator packaging/build references (nuspec, csproj, solution, and nupkg verification).

Reviewed changes

Copilot reviewed 37 out of 38 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/skills/settings-migration/SKILL.md Adds the documented migration procedure intended to replace the removed executable tool.
TestPlatform.sln Removes SettingsMigrator and its unit test projects from the solution.
eng/verify-nupkgs.ps1 Stops expecting SettingsMigrator.exe in produced NuGet packages.
src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.csproj Drops the project reference to SettingsMigrator from packaging build.
src/package/Microsoft.TestPlatform/Microsoft.TestPlatform.nuspec Removes SettingsMigrator binaries/resources from the packaged output.
src/package/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI/Microsoft.VisualStudio.TestTools.TestPlatform.V2.CLI.csproj Removes Vsix/source and project references related to SettingsMigrator.
src/SettingsMigrator/Migrator.cs Removes the XML migration implementation (tool is decommissioned).
src/SettingsMigrator/PathResolver.cs Removes CLI path resolution logic (tool is decommissioned).
src/SettingsMigrator/Program.cs Removes the CLI entry point (tool is decommissioned).
src/SettingsMigrator/NullableHelpers.cs Removes tool-specific generated nullable helpers.
src/SettingsMigrator/NullableHelpers.tt Removes the tool’s T4 template used to generate nullable helpers.
src/SettingsMigrator/PublicAPI/PublicAPI.Shipped.txt Removes public API tracking for the deleted tool assembly.
src/SettingsMigrator/PublicAPI/PublicAPI.Unshipped.txt Removes unshipped API tracking for the deleted tool assembly.
src/SettingsMigrator/Resources/Resources.resx Removes tool command-line/localized strings resources.
src/SettingsMigrator/Resources/xlf/Resources.xlf Removes the XLIFF source file for localization.
src/SettingsMigrator/Resources/xlf/Resources.cs.xlf Removes Czech localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.de.xlf Removes German localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.es.xlf Removes Spanish localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.fr.xlf Removes French localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.it.xlf Removes Italian localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.ja.xlf Removes Japanese localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.ko.xlf Removes Korean localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.pl.xlf Removes Polish localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.pt-BR.xlf Removes Portuguese (Brazil) localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.ru.xlf Removes Russian localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.tr.xlf Removes Turkish localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.zh-Hans.xlf Removes Simplified Chinese localization for the tool.
src/SettingsMigrator/Resources/xlf/Resources.zh-Hant.xlf Removes Traditional Chinese localization for the tool.
src/SettingsMigrator/SettingsMigrator.csproj Removes the tool project definition from the repo.
src/SettingsMigrator/TestSettingsNodes.cs Removes the helper model type used by the tool.
test/SettingsMigrator.UnitTests/MigratorTests.cs Removes unit tests for migration behavior.
test/SettingsMigrator.UnitTests/PathResolverTests.cs Removes unit tests for CLI/path resolution behavior.
test/SettingsMigrator.UnitTests/ProgramTests.cs Removes unit tests for CLI argument handling.
test/SettingsMigrator.UnitTests/SettingsMigrator.UnitTests.csproj Removes the unit test project definition.
test/SettingsMigrator.UnitTests/oldRunSettingsWithDataCollector.runsettings Removes test data used by the deleted unit tests.
test/SettingsMigrator.UnitTests/oldRunSettingsWithEmbeddedSettings.runsettings Removes test data used by the deleted unit tests.
test/SettingsMigrator.UnitTests/oldTestSettings.testsettings Removes test data used by the deleted unit tests.
Files not reviewed (1)
  • src/SettingsMigrator/Resources/Resources.Designer.cs: Language not supported


Visual Studio historically used `.testsettings` files for test configuration. The modern format is `.runsettings`. The two formats differ in structure, and some `.testsettings` nodes map to `<LegacySettings>` wrappers in `.runsettings` to preserve backward compatibility.

See also: [RFC 0023 - TestSettings Deprecation](../../docs/RFCs/0023-TestSettings-Deprecation.md)
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The relative link likely points to .github/docs/... rather than the repo-level docs/... because this file lives under .github/skills/settings-migration/. Update the relative path (e.g., one more ..) so the RFC link resolves correctly on GitHub.

Suggested change
See also: [RFC 0023 - TestSettings Deprecation](../../docs/RFCs/0023-TestSettings-Deprecation.md)
See also: [RFC 0023 - TestSettings Deprecation](../../../docs/RFCs/0023-TestSettings-Deprecation.md)

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +52
| XPath in .testsettings | Node Name | Purpose |
|---|---|---|
| `/TestSettings/Deployment` | Deployment | File deployment settings |
| `/TestSettings/Scripts` | Scripts | Setup/cleanup scripts |
| `/TestSettings/Execution/TestTypeSpecific/WebTestRunConfiguration` | WebSettings | Web test configuration |
| `/TestSettings/Execution/AgentRule/DataCollectors/DataCollector` | DataCollectors | Data collector definitions |
| `/TestSettings/Execution/Timeouts` | Timeouts | Timeout attributes |
| `/TestSettings/Execution/TestTypeSpecific/UnitTestRunConfig` | UnitTestConfig | Unit test run configuration |
| `/TestSettings/Execution/Hosts` | Hosts | Host configuration |
| `/TestSettings/Execution` | Execution | Execution attributes (parallelTestCount, hostProcessPlatform) |
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This markdown table syntax is invalid due to the double leading pipes (||), which prevents GitHub from rendering it as a table. Replace each row with a single leading | so the mapping table renders correctly.

Copilot uses AI. Check for mistakes.
```

**Rules for the Execution sub-node:**
- Only create `<Execution>` if at least one of `UnitTestConfig`, `parallelTestCount`, `testTimeout`, `Hosts` is present
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rules are internally inconsistent: the bullet list says hostProcessPlatform is an <Execution> attribute, but the condition for creating <Execution> doesn’t include hostProcessPlatform. Either include hostProcessPlatform in the creation condition, or explicitly document what to do when hostProcessPlatform is present but none of the other triggers are.

Suggested change
- Only create `<Execution>` if at least one of `UnitTestConfig`, `parallelTestCount`, `testTimeout`, `Hosts` is present
- Only create `<Execution>` if at least one of `UnitTestConfig`, `parallelTestCount`, `testTimeout`, `Hosts`, or `hostProcessPlatform` is present

Copilot uses AI. Check for mistakes.
Documents how every code path, test scenario, and XML mapping from the
removed SettingsMigrator tool is accounted for in the replacement skill.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nohwnd nohwnd marked this pull request as draft March 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants