diff --git a/src/Shared/LayoutRenderers/AspNetResponseCookieLayoutRenderer.cs b/src/Shared/LayoutRenderers/AspNetResponseCookieLayoutRenderer.cs index f18daa64..3c8ea975 100644 --- a/src/Shared/LayoutRenderers/AspNetResponseCookieLayoutRenderer.cs +++ b/src/Shared/LayoutRenderers/AspNetResponseCookieLayoutRenderer.cs @@ -1,9 +1,7 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Net.Sockets; using System.Text; -using NLog.Config; using NLog.LayoutRenderers; using NLog.Web.Enums; using NLog.Web.Internal; @@ -74,7 +72,7 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent) var cookies = GetCookies(httpResponse); #if ASP_NET_CORE - if (cookies.Any()) + if (cookies.Count > 0) #else if(cookies.Count > 0) #endif