diff --git a/examples/ASP.NET 4.6.1/Visual Studio 2017/ASP.NET 4.6.1 - VS2017/packages.config b/examples/ASP.NET 4.6.1/Visual Studio 2017/ASP.NET 4.6.1 - VS2017/packages.config
index 5f20e563..8d396b00 100644
--- a/examples/ASP.NET 4.6.1/Visual Studio 2017/ASP.NET 4.6.1 - VS2017/packages.config
+++ b/examples/ASP.NET 4.6.1/Visual Studio 2017/ASP.NET 4.6.1 - VS2017/packages.config
@@ -12,7 +12,7 @@
-
+
\ No newline at end of file
diff --git a/src/NLog.Web.AspNetCore/AspNetExtensions.cs b/src/NLog.Web.AspNetCore/AspNetExtensions.cs
index 60d5d795..2e3d9b27 100644
--- a/src/NLog.Web.AspNetCore/AspNetExtensions.cs
+++ b/src/NLog.Web.AspNetCore/AspNetExtensions.cs
@@ -390,7 +390,7 @@ private static NLogLoggerProvider CreateNLogLoggerProvider(IServiceProvider serv
TryLoadConfigurationFromContentRootPath(provider.LogFactory, contentRootPath);
}
- if (provider.Options.ShutdownOnDispose)
+ if (provider.Options.ShutdownOnDispose || !provider.Options.AutoShutdown)
{
provider.LogFactory.AutoShutdown = false;
}
diff --git a/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj b/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
index 800e939c..32827e64 100644
--- a/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
+++ b/src/NLog.Web.AspNetCore/NLog.Web.AspNetCore.csproj
@@ -99,7 +99,7 @@ NLog 5 release post: https://nlog-project.org/2021/08/25/nlog-5-0-preview1-ready
$(DefineConstants);ASP_NET_CORE;ASP_NET_CORE3
-
+
diff --git a/src/NLog.Web/NLog.Web.csproj b/src/NLog.Web/NLog.Web.csproj
index 5e84b708..5e7ef071 100644
--- a/src/NLog.Web/NLog.Web.csproj
+++ b/src/NLog.Web/NLog.Web.csproj
@@ -49,7 +49,7 @@ See https://github.com/NLog/NLog.Web/releases
-
+