Skip to content

Migrate unit tests from xunit v2 to xunit.v3 #5

Done

Description

@ardalis

Summary

The test project still uses xunit v2 (xunit 2.9.3, the final v2 release). We left this out of the .NET 11 upgrade (#4) because it's a bigger change. This issue tracks moving to xunit.v3.

Tasks

  • In Directory.Packages.props, replace xunit with xunit.v3 (latest stable: 4.0.3)
  • Check that xunit.runner.visualstudio 4.x and Microsoft.NET.Test.Sdk work with v3, or switch to Microsoft.Testing.Platform
  • Set <OutputType>Exe</OutputType> on the test project (v3 test projects are executables)
  • Update any v2-only APIs (e.g. IAsyncLifetime now returns ValueTask, Xunit.Abstractions namespace removed)
  • Confirm coverlet.collector still collects coverage under v3
  • dotnet test passes locally and in CI

Notes

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Nov 25, 2026
    2caa688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions