Use GitHub Actions Test Logger with VSTest
primeTo use the reporter with VSTest, add the --logger GitHubActions option to your test command.
Important Compatibility Notes
- xUnit v3: Replace the
xunit.v3package reference withxunit.v3.mtp-offto avoid conflicts with the built-in MTP dependency in the base package. - Peer Dependency: It is highly recommended to install the latest version of
Microsoft.NET.Test.Sdkin your test project. - Legacy .NET SDK: If using .NET SDK v2.2 or lower, you must set
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>in your test project. - Package Visibility: Unlike the MTP mode, you can mark the
GitHubActionsTestLoggerpackage reference as private usingPrivateAssets="all"when using VSTest.
run: dotnet test --configuration Release --logger GitHubActions