From d24310439772974548e03ddeb435e3019856b902 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 02:26:15 +0000 Subject: [PATCH 1/2] Migrate test project from VSTest to Microsoft Testing Platform Switch SIL.Harmony.Tests to run on Microsoft.Testing.Platform (MTP) instead of VSTest, following the .NET VSTest-to-MTP migration guidance. - Enable the MTP runner for the xUnit.net v3 test project (UseMicrosoftTestingPlatformRunner + OutputType=Exe). - Use the xunit.v3.mtp-v2 package so the GitHubActionsTestLogger MTP extension (which requires MTP v2) can report results in CI. - Add global.json with test.runner=Microsoft.Testing.Platform so `dotnet test` uses MTP on the .NET 10 SDK. - Remove VSTest-only packages: Microsoft.NET.Test.Sdk, xunit.runner.visualstudio, coverlet.collector, and the explicit Microsoft.Testing.Platform reference (now transitive). - Update CI workflows to replace the VSTest `--logger GitHubActions` with the MTP `--report-github` flag. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01PKdgdJdeDQrwFE5pruMH3n --- .github/workflows/nuget-ci-cd.yml | 2 +- .github/workflows/test.yaml | 2 +- Directory.Packages.props | 8 ++------ global.json | 5 +++++ src/SIL.Harmony.Tests/SIL.Harmony.Tests.csproj | 18 ++++-------------- 5 files changed, 13 insertions(+), 22 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/nuget-ci-cd.yml b/.github/workflows/nuget-ci-cd.yml index cca5873..ee26299 100644 --- a/.github/workflows/nuget-ci-cd.yml +++ b/.github/workflows/nuget-ci-cd.yml @@ -35,7 +35,7 @@ jobs: uses: actions/setup-dotnet@v4 - name: Build & test - run: dotnet test --configuration Release --logger GitHubActions + run: dotnet test --configuration Release --report-github - name: Pack shell: bash diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index e13030e..46d3163 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-dotnet@v4 - name: Build & test - run: dotnet test --configuration Release --logger GitHubActions + run: dotnet test --configuration Release --report-github - name: Download previous benchmark data uses: actions/cache@v4 with: diff --git a/Directory.Packages.props b/Directory.Packages.props index 6c90d98..e041665 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,22 +6,18 @@ - - + - - - - + diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/src/SIL.Harmony.Tests/SIL.Harmony.Tests.csproj b/src/SIL.Harmony.Tests/SIL.Harmony.Tests.csproj index f542263..a53c443 100644 --- a/src/SIL.Harmony.Tests/SIL.Harmony.Tests.csproj +++ b/src/SIL.Harmony.Tests/SIL.Harmony.Tests.csproj @@ -4,29 +4,19 @@ false true SIL.Harmony.Tests + Exe + true - - - all - + - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - + From d08ab9eb7e09bc4cfee36c5bea527341bfede656 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 7 Aug 2026 04:47:51 +0000 Subject: [PATCH 2/2] Pin Microsoft.Testing.Platform to 2.0.2 for xunit.v3.mtp-v2 With central transitive pinning enabled (merged from main), the pin must be >= 2.0.2 to satisfy xunit.v3.core.mtp-v2 3.2.2; 2.0.0 caused an NU1109 package downgrade error on restore. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01PKdgdJdeDQrwFE5pruMH3n --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index d8eb00c..2217c19 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,7 @@ vulnerability (GHSA-2m69-gcr7-jv3q / NU1903). 2.1.12 is the patched release. --> - +