diff --git a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs index 1d6c421ea4..1acdcab096 100644 --- a/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs +++ b/test/Microsoft.IdentityModel.AotCompatibility.Tests/AotCompatibilityTests.cs @@ -54,7 +54,11 @@ public void EnsureAotCompatibility() CreateNoWindow = true, WorkingDirectory = testAppPath }; - process.OutputDataReceived += (sender, e) => _testOutputHelper.WriteLine(e.Data); + process.OutputDataReceived += (sender, eventArgs) => + { + if (eventArgs.Data is not null) + _testOutputHelper.WriteLine(eventArgs.Data); + }; process.Start(); process.BeginOutputReadLine();