Skip to content

Commit 5cf6e33

Browse files
Fix CI test logger failure on .NET 10 / vstest 18 (#1)
GitHubActionsTestLogger 2.x uses the legacy VSTest extension discovery mechanism which no longer works with vstest 18.0.1 shipped in the .NET 10 SDK. Switch to v3.0.1, which targets Microsoft.Testing.Platform (MTP) and auto-registers via TestingPlatformBuilderHook — no explicit --logger flag required. - Add tests/Directory.Build.props to enable UseMicrosoftTestingPlatformRunner and include GitHubActionsTestLogger in all test projects (chains to root Directory.Build.props) - Bump GitHubActionsTestLogger to 3.0.1 in Directory.Packages.props - Remove --logger "github;..." from the CI test step (auto-registered by MTP) Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent dd1b9eb commit 5cf6e33

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
run: dotnet build --no-restore --configuration Release
2828

2929
- name: Test
30-
run: dotnet test --no-build --configuration Release --logger "github;summary.includePassedTests=true;summary.includeSkippedTests=true"
30+
run: dotnet test --no-build --configuration Release

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.3" />
2727
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
2828
<!-- Testing -->
29+
<PackageVersion Include="GitHubActionsTestLogger" Version="3.0.1" />
2930
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
3031
<PackageVersion Include="NSubstitute" Version="5.3.0" />
3132
<PackageVersion Include="xunit" Version="2.9.3" />

tests/Directory.Build.props

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project>
2+
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
3+
4+
<PropertyGroup>
5+
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="GitHubActionsTestLogger">
10+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
11+
<PrivateAssets>all</PrivateAssets>
12+
</PackageReference>
13+
</ItemGroup>
14+
</Project>

0 commit comments

Comments
 (0)