Meziantou.Extensions.Logging.Xunit 2.0.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Meziantou.Extensions.Logging.Xunit --version 2.0.0
                    
NuGet\Install-Package Meziantou.Extensions.Logging.Xunit -Version 2.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Extensions.Logging.Xunit" Version="2.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Extensions.Logging.Xunit" Version="2.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Meziantou.Extensions.Logging.Xunit" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Extensions.Logging.Xunit --version 2.0.0
                    
#r "nuget: Meziantou.Extensions.Logging.Xunit, 2.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Extensions.Logging.Xunit@2.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Extensions.Logging.Xunit&version=2.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Meziantou.Extensions.Logging.Xunit&version=2.0.0
                    
Install as a Cake Tool

Meziantou.Extensions.Logging.Xunit

ILogger logger = XUnitLogger.CreateLogger(testOutputHelper);
ILogger<MyType> logger = XUnitLogger.CreateLogger<MyType>(testOutputHelper);

If you are using a WebApplicationFactory:

public class UnitTest1(ITestOutputHelper testOutputHelper)
{
    [Fact]
    public async Task Test1()
    {
        using var factory = new WebApplicationFactory<Program>()
            .WithWebHostBuilder(builder =>
            {
                builder.ConfigureLogging(builder =>
                {
                    // You can override the logging configuration if needed
                    //builder.SetMinimumLevel(LogLevel.Trace);
                    //builder.AddFilter(_ => true);

                    // Register the xUnit logger provider
                    builder.Services.AddSingleton<ILoggerProvider>(new XUnitLoggerProvider(testOutputHelper, appendScope: false));
                });
            });
    }
}

Blog post about this package: How to write logs from ILogger to xUnit.net ITestOutputHelper

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Meziantou.Extensions.Logging.Xunit:

Package Downloads
Drammer.Web.IntegrationTesting

Integration testing framework for the Drammer whisky app.

GitHub repositories (5)

Showing the top 5 popular GitHub repositories that depend on Meziantou.Extensions.Logging.Xunit:

Repository Stars
JasperFx/wolverine
Supercharged .NET server side development!
kerryjiang/WebSocket4Net
A popular .NET WebSocket Client
NikiforovAll/keycloak-authorization-services-dotnet
Authentication and Authorization with Keycloak and ASP.NET Core 🔐
LittleLittleCloud/StepWise
A C# framework to build, visualize and execute event-driven workflow
marinasundstrom/YourBrand
Prototype enterprise system for e-commerce and consulting services
Version Downloads Last Updated
2.0.1 434 5/14/2026
2.0.0 2,103 5/6/2026
1.0.27 6,642 4/25/2026
1.0.26 12,166 3/29/2026
1.0.25 11,534 3/15/2026
1.0.24 12,145 2/22/2026
1.0.23 38,990 1/18/2026
1.0.22 17,905 12/28/2025
1.0.21 6,421 12/14/2025
1.0.20 37,314 11/16/2025
1.0.19 33,394 10/19/2025
1.0.18 49,197 9/16/2025
1.0.17 13,746 9/3/2025
1.0.16 31,498 8/10/2025
1.0.15 29,135 7/27/2025
1.0.14 18,502 7/13/2025
1.0.13 42,362 6/15/2025
1.0.12 88,677 5/18/2025
1.0.11 68,942 4/13/2025
1.0.10 76,835 3/16/2025
Loading failed