diff --git a/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj b/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj
index e26470e4c..7951edb65 100644
--- a/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj
+++ b/NLog.Web.AspNetCore.Tests/NLog.Web.AspNetCore.Tests.csproj
@@ -8,25 +8,25 @@
-
+
-
-
-
+
+
+
-
+
-
+
-
+
diff --git a/NLog.Web.AspNetCore.Tests/TestBase.cs b/NLog.Web.AspNetCore.Tests/TestBase.cs
index f81e68952..8f75299b0 100644
--- a/NLog.Web.AspNetCore.Tests/TestBase.cs
+++ b/NLog.Web.AspNetCore.Tests/TestBase.cs
@@ -26,7 +26,7 @@ public HeaderDict()
-#if NETCOREAPP2_0
+#if NETCOREAPP2_0 || NET461
///
/// Strongly typed access to the Content-Length header. Implementations must keep this in sync with the string representation.
///
diff --git a/NLog.Web.AspNetCore/AspNetExtensions.cs b/NLog.Web.AspNetCore/AspNetExtensions.cs
index 2da98a1ad..28bf58a87 100644
--- a/NLog.Web.AspNetCore/AspNetExtensions.cs
+++ b/NLog.Web.AspNetCore/AspNetExtensions.cs
@@ -10,7 +10,7 @@
using NLog.Web.Internal;
using NLog.Extensions.Logging;
using NLog.Web.AspNetCore;
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NET461
using Microsoft.Extensions.DependencyInjection;
#endif
@@ -60,7 +60,7 @@ private static LoggingConfiguration ConfigureNLog(string fileName)
}
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NET461
///
/// Apply NLog configuration from XML config.
diff --git a/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj b/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
index 4514fe7dc..d2a1dc2ed 100644
--- a/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
+++ b/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
@@ -5,7 +5,7 @@
NLog.Web.AspNetCore
Julian Verdurmen
- netstandard1.3;netstandard1.5;net451;netstandard2.0
+ netstandard1.3;netstandard1.5;net451;net461;netstandard2.0
$(DefineConstants);ASP_NET_CORE
true
NLog.Web.AspNetCore
@@ -52,10 +52,7 @@
-
-
-
-
+
@@ -63,7 +60,8 @@
-
+
+
@@ -73,19 +71,12 @@
-
+
+
-
-
-
-
-
-
-
-
diff --git a/NLog.Web.AspNetCore/NLogBuilder.cs b/NLog.Web.AspNetCore/NLogBuilder.cs
index a3207622f..0272c01a2 100644
--- a/NLog.Web.AspNetCore/NLogBuilder.cs
+++ b/NLog.Web.AspNetCore/NLogBuilder.cs
@@ -1,4 +1,4 @@
-#if NETSTANDARD2_0
+#if NETSTANDARD2_0 || NET461
using System;