Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" />
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

GitHubActionsTestLogger NuGet package version 3.0.1 latest

💡 Result:

Yes—GitHubActionsTestLogger 3.0.1 is the latest stable release on NuGet, last updated Nov 24, 2025. [1][2]


🌐 Web query:

GitHubActionsTestLogger compatibility Microsoft.NET.Test.Sdk

💡 Result:

  • Minimum requirement (VSTest / dotnet test --logger GitHubActions): Your test project should reference Microsoft.NET.Test.Sdk >= 16.8.0; older versions may not work correctly with custom loggers like GitHubActionsTestLogger. [1]
  • Works with current 17.x (including 17.14.x): Microsoft.NET.Test.Sdk continues to be compatible broadly, but note the runner’s own .NET targeting changes below. [2]
  • If your test project targets net6.0: VS Test 17.14 moved to newer .NET versions; guidance is to pin Microsoft.NET.Test.Sdk to 17.13.0 (or upgrade the test project to net8.0+). [3]
  • If you’re using Microsoft.Testing.Platform (MTP) instead of VSTest: Newer GitHubActionsTestLogger versions advertise support for both VSTest and MTP. [4] (Historically, MTP didn’t parse --logger the same way, which is why older setups could fail.) [5]

Sources:
[1] NuGet readme for GitHubActionsTestLogger (versioned page showing the Microsoft.NET.Test.Sdk >= 16.8.0 requirement). (nuget.org)
[2] NuGet page for Microsoft.NET.Test.Sdk 17.14.1. (nuget.org)
[3] microsoft/vstest release notes (17.14: net6 projects should pin Microsoft.NET.Test.Sdk to 17.13.0). (github.com)
[4] NuGet page for GitHubActionsTestLogger 3.0.1 (“Extension for VSTest and Microsoft.Testing.Platform”). (nuget.org)
[5] GitHub issue discussing MTP not parsing --logger in older versions (context for compatibility problems). (github.com)

Citations:


🌐 Web query:

GitHubActionsTestLogger PrivateAssets all recommended test project

💡 Result:

For GitHubActionsTestLogger, the recommended way to reference it from a test project is to mark it as test-only so it doesn’t flow transitively to other projects/packages:

<ItemGroup>
  <PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" PrivateAssets="all" />
</ItemGroup>

NuGet’s own snippet for this package also uses <PrivateAssets>all</PrivateAssets> (and sometimes an explicit IncludeAssets list) for the same reason: keep the logger available to the test project, but prevent it from becoming a transitive dependency of anything that references the test project. [1]

If you follow NuGet’s “full” form (as shown on older version pages), it looks like this:

<PackageReference Include="GitHubActionsTestLogger" Version="2.3.0">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>

That IncludeAssets is not redundant because it can exclude assets like compile (even when PrivateAssets=all). [2]

Source(s): NuGet package page for GitHubActionsTestLogger (shows the recommended PackageReference, including PrivateAssets and sometimes IncludeAssets) [1]; explanation of PrivateAssets vs IncludeAssets behavior [2].

References:
[1] NuGet Gallery – GitHubActionsTestLogger (latest) https://www.nuget.org/packages/GitHubActionsTestLogger
[2] Stack Overflow – “If a nuget specifies PrivateAssets=all why specify IncludeAssets?” https://stackoverflow.com/questions/73180516/if-a-nuget-specifies-privateassets-all-why-specify-includeassets


Add PrivateAssets="all" to isolate test logger from transitive dependencies.

The package reference should be updated to prevent the logger from flowing transitively:

Suggested change
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" PrivateAssets="all" />
🤖 Prompt for AI Agents
In `@tests/Directory.Build.props` at line 9, Update the PackageReference for the
GitHubActionsTestLogger so it doesn't flow transitively: locate the
PackageReference element with Include="GitHubActionsTestLogger" and
Version="3.0.1" in Directory.Build.props and add the attribute
PrivateAssets="all" to the element (i.e., set PrivateAssets on the
PackageReference for GitHubActionsTestLogger).

<PackageReference Include="Shouldly" Version="4.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="bunit" Version="1.*" />
Expand Down