diff --git a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj
index 26e05d9..afbd882 100644
--- a/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj
+++ b/examples/Xunit.Microsoft.DependencyInjection.ExampleTests/Xunit.Microsoft.DependencyInjection.ExampleTests.csproj
@@ -15,8 +15,8 @@
-
-
+
+
diff --git a/src/Logging/NilLoggerProvider.cs b/src/Logging/NilLoggerProvider.cs
index 34be929..5625fdc 100644
--- a/src/Logging/NilLoggerProvider.cs
+++ b/src/Logging/NilLoggerProvider.cs
@@ -11,7 +11,7 @@ public void Dispose()
private class NilLogger : ILogger
{
- public IDisposable BeginScope(TState state)
+ public IDisposable? BeginScope(TState state) where TState : notnull
=> new NoOpDisposable();
public bool IsEnabled(LogLevel logLevel)
diff --git a/src/Logging/OutputLogger.cs b/src/Logging/OutputLogger.cs
index 8c9747d..99543db 100644
--- a/src/Logging/OutputLogger.cs
+++ b/src/Logging/OutputLogger.cs
@@ -16,7 +16,7 @@ public OutputLogger(string categoryName, ITestOutputHelper testOutputHelper)
_categoryName = categoryName;
}
- public IDisposable BeginScope(TState state)
+ public IDisposable? BeginScope(TState state) where TState : notnull
=> new NoOpDisposable();
public bool IsEnabled(LogLevel logLevel)