title: Migrate AddNLog from .NET Core 2.2 to 3.0
body: <p>In the <code>Startup</code> class of my project I have the following <code>Configure</code> method:</p>
  
  <pre><code>private void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
  {
      ...
      loggerFactory.AddNLog();
      ...
  }
  </code></pre>
  
  <p>This worked OK in .NET Core 2.2, but after upgrading to 3.0, I get the warning <code>Method 'NLog.Extensions.Logging.ConfigureExtenstions.AddNLog' is obsolete: instead use ILoggingBuilder.AddNLog() or IHostBuilder.UseNLog().</code> </p>
  
  <p>So I tried to update the method to </p>
  
  <pre><code>private void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggingBuilder loggingBuilder)
  {
      ...
      loggingBuilder.AddNLog();
      ...
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>private void Configure(IApplicationBuilder app, IWebHostEnvironment env, IHostBuilder hostBuilder)
  {
      ...
      hostBuilder.UseNLog();
      ...
  }
  </code></pre>
  
  <p>But in both cases I got a DI exception: <code>Could not resolve a service of type {Microsoft.Extensions.Logging.ILoggingBuilder/Microsoft.Extensions.Hosting.IHostBuilder} for the parameter {loggingBuilder/hostBuilder} of method 'Configure' on type 'MyProject.Startup'</code>.</p>
  
  <p>I could not find any viable source on how to change the NLog configuration fro .NET Core 3.0 and there is nothing about logging in the <a href="https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.0&amp;tabs=visual-studio#migrate-startupconfigure" rel="noreferrer">official Microsoft guide</a>. Does anyone know how to solve this issue?</p>