diff --git a/src/NLog.Web.AspNetCore/AspNetExtensions.cs b/src/NLog.Web.AspNetCore/AspNetExtensions.cs
index 723472922..a79e96df6 100644
--- a/src/NLog.Web.AspNetCore/AspNetExtensions.cs
+++ b/src/NLog.Web.AspNetCore/AspNetExtensions.cs
@@ -112,8 +112,11 @@ public static LogFactory ConfigureNLog(this ILoggingBuilder builder, LoggingConf
         /// <param name="configFileName">Path to NLog configuration file, e.g. nlog.config. </param>
         public static ILoggingBuilder AddNLog(this ILoggingBuilder builder, string configFileName)
         {
-            ConfigureServicesNLog(null, builder.Services, serviceProvider => serviceProvider.GetService<IConfiguration>());
-            LogManager.LoadConfiguration(configFileName);
+            ConfigureServicesNLog(null, builder.Services, (s, c) =>
+            {
+                c(s.GetService<IConfiguration>());
+                LogManager.LoadConfiguration(configFileName);   // Delay initialization of targets until we have loaded config-settings
+            });
             return builder;
         }
 
@@ -124,8 +127,11 @@ public static ILoggingBuilder AddNLog(this ILoggingBuilder builder, string confi
         /// <param name="configuration">Config for NLog</param>
         public static ILoggingBuilder AddNLog(this ILoggingBuilder builder, LoggingConfiguration configuration)
         {
-            ConfigureServicesNLog(null, builder.Services, serviceProvider => serviceProvider.GetService<IConfiguration>());
-            LogManager.Configuration = configuration;
+            ConfigureServicesNLog(null, builder.Services, (s, c) =>
+            {
+                c(s.GetService<IConfiguration>());
+                LogManager.Configuration = configuration;       // Delay initialization of targets until we have loaded config-settings
+            });
             return builder;
         }
 
@@ -150,7 +156,7 @@ public static IWebHostBuilder UseNLog(this IWebHostBuilder builder, NLogAspNetCo
                 throw new ArgumentNullException(nameof(builder));
             }
 
-            builder.ConfigureServices(services => { ConfigureServicesNLog(options, services, serviceProvider => serviceProvider.GetService<IConfiguration>()); });
+            builder.ConfigureServices((builderContext, services) => ConfigureServicesNLog(options, services, (s, c) => c(builderContext.Configuration)));
             return builder;
         }
 
@@ -175,11 +181,11 @@ public static IHostBuilder UseNLog(this IHostBuilder builder, NLogAspNetCoreOpti
                 throw new ArgumentNullException(nameof(builder));
             }
 
-            builder.ConfigureServices((hostbuilder, services) => { ConfigureServicesNLog(options, services, serviceProvider => hostbuilder.Configuration); });
+            builder.ConfigureServices((builderContext, services) => ConfigureServicesNLog(options, services, (s, c) => c(builderContext.Configuration)));
             return builder;
         }
 
-        private static void ConfigureServicesNLog(NLogAspNetCoreOptions options, IServiceCollection services, Func<IServiceProvider, IConfiguration> lookupConfiguration)
+        private static void ConfigureServicesNLog(NLogAspNetCoreOptions options, IServiceCollection services, Action<IServiceProvider, Action<IConfiguration>> setupConfiguration)
         {
             ConfigurationItemFactory.Default.RegisterItemsFromAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
             LogManager.AddHiddenAssembly(typeof(AspNetExtensions).GetTypeInfo().Assembly);
@@ -189,15 +195,14 @@ private static void ConfigureServicesNLog(NLogAspNetCoreOptions options, IServic
                 ServiceLocator.ServiceProvider = serviceProvider;
 
                 var provider = new NLogLoggerProvider(options ?? new NLogProviderOptions());
-                var configuration = lookupConfiguration(serviceProvider);
-                if (configuration != null)
+                setupConfiguration(serviceProvider, configuration =>
                 {
                     ConfigSettingLayoutRenderer.DefaultConfiguration = configuration;
                     if (options == null)
                     {
                         provider.Configure(configuration.GetSection("Logging:NLog"));
                     }
-                }
+                });
 
                 return provider;
             }));