Skip to content

Commit 7fb9608

Browse files
mikependonclaude
andcommitted
Fix dotnet test failing on .NET 10 with Microsoft.Testing.Platform 2.x.
The .NET 10 SDK ships microsoft.testing.platform.msbuild 2.x which no longer supports the legacy VSTest execution path. Passing TestingPlatformDotnetTestSupport=true on the dotnet test command line forces all projects in the solution to use the new MTP-native test execution model, bypassing the VSTest target. Also fixed build-pr.yml: the test step targeted net10.0 but only installed up to 8.0.x SDK, causing the run to fail before any tests executed. Updated to install 8.0.x, 9.0.x, and 10.0.x to match build.yml. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent aa0edfd commit 7fb9608

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/build-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ jobs:
4646
uses: actions/setup-dotnet@v4
4747
with:
4848
dotnet-version: |
49-
6.0.x
50-
7.0.x
5149
8.0.x
50+
9.0.x
51+
10.0.x
5252
5353
- name: build
5454
run: dotnet build -c release
5555

5656
- name: test for .NET 10.0
57-
run: dotnet test -c release -f net10.0 --no-build -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false
57+
run: dotnet test -c release -f net10.0 --no-build -p:TestingPlatformDotnetTestSupport=true -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false RepoDb.Solutions.sln
5858

5959
- name: pack packages
6060
run: dotnet pack -c release -p Version="1.14.0-dev-pr-${{ github.run_number }}" -o release RepoDb.Solutions.sln

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: dotnet build -c release RepoDb.Solutions.sln
5555

5656
- name: test for .NET 10.0
57-
run: dotnet test -c release -f net10.0 --no-build -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false RepoDb.Solutions.sln
57+
run: dotnet test -c release -f net10.0 --no-build -p:TestingPlatformDotnetTestSupport=true -p:TestingPlatformShowTestsFailure=true -p:TestingPlatformCaptureOutput=false RepoDb.Solutions.sln
5858

5959
- name: pack packages
6060
run: dotnet pack -c release -p Version="1.14.0-dev-${{ github.run_number }}" -o release RepoDb.Solutions.sln

0 commit comments

Comments
 (0)