Table of Contents

Core Framework v3 4.0.1 2026 September 12

Today, we're shipping two new releases:

  • xUnit.net Core Framework v3 4.0.1
  • xUnit.net Analyzers 2.1.0 (release notes)

It's been 4 weeks since the release of 4.0.0.

As always, we'd like to thank all the users who contributed to the success of xUnit.net through usage, feedback, and code. 🎉

Release Notes

These release notes are a list of changes from 4.0.0 to 4.0.1.

Core Framework

  • We have added the ability to disable all C# compiler warnings for generated code. Place this property into your .csproj file:

    <PropertyGroup>
      <DefineConstants>$(DefineConstants);XUNIT_GENERATED_DISABLE_WARNINGS</DefineConstants>
    </PropertyGroup>
    

    This disable warnings for the auto-generated entry point and all source generators for Native AOT. It should only be used if the generated code is conflicting with an analyzer, as compiler warnings can be helpful in diagnosing code generation issues. xunit/xunit#3606

  • BUG: Serialization of DateTime and DateTimeOffset were normalizing values to UTC, which lost the original timezone when deserialized. This could cause the test cases with identical moments in time in different timezones to be rejected as duplicate, even though the original data wasn't identical. xunit/xunit#3614

Runners

  • We have added a new Markdown results report (-result-markdown in xUnit.net command line UX, --report-xunit-markdown in Microsoft Testing Platform UX, and Markdown='filename' in the MSBuild runner). This is a simplified report which shows summary information as well as details for any non-passing tests. See the linked issue for an example multi-assembly report. xunit/xunit#3615

  • We have updated the CTRF report to add /results/summary/duration to show overall clock time of the test run, as well as adding /results/environment/extra/machine and /results/environment/extra/user to better align with the Microsoft Testing Platform CTRF results.

Extensibility

  • We have marked TestFrameworkExecutor.CreateDiscoverer as obsolete, because it was never being called. It will be removed in the next major release. xunit/xunit#2163

Microsoft Testing Platform

  • The Microsoft Testing Platform v2 packages have been updated to version 2.4.0.