diff --git a/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs b/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs index 6242fd4664..ae3a26358a 100644 --- a/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs +++ b/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs @@ -236,7 +236,7 @@ public async ValueTask DisposeAsync() await DisposeHelper.DisposeAsync(_singleConnectionNamedPipeServer).ConfigureAwait(false); // Dispose the pipe descriptor after the server to ensure the pipe is closed. - _pipeNameDescription?.Dispose(); + _pipeNameDescription.Dispose(); } #else public void Dispose() @@ -244,7 +244,7 @@ public void Dispose() _singleConnectionNamedPipeServer?.Dispose(); // Dispose the pipe descriptor after the server to ensure the pipe is closed. - _pipeNameDescription?.Dispose(); + _pipeNameDescription.Dispose(); } #endif