diff --git a/Directory.Packages.props b/Directory.Packages.props
index f3ad23c543..f1f5623e44 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -43,7 +43,7 @@
-
+
diff --git a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/StreamMessageHandler.cs b/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/StreamMessageHandler.cs
index d056774c55..e092e70a4d 100644
--- a/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/StreamMessageHandler.cs
+++ b/src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/StreamMessageHandler.cs
@@ -3,12 +3,10 @@
using System.Text;
-#if !NET8_0_OR_GREATER
-using Microsoft.Testing.Platform.Helpers;
-#endif
-
#if NETCOREAPP
using System.Buffers;
+#else
+using Microsoft.Testing.Platform.Helpers;
#endif
namespace Microsoft.Testing.Platform.ServerMode;
@@ -129,11 +127,7 @@ public async Task WriteRequestAsync(RpcMessage message, CancellationToken cancel
await _writer.WriteLineAsync("Content-Type: application/testingplatform");
await _writer.WriteLineAsync();
await _writer.WriteAsync(messageStr);
-#if NET8_0_OR_GREATER
await _writer.FlushAsync(cancellationToken);
-#else
- await _writer.FlushAsync().WithCancellationAsync(cancellationToken);
-#endif
}
protected virtual void Dispose(bool disposing)