title: NLog.config is not loaded in asp.net core 2.1 project?
body: <p>I have the following NLog.Config</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
        autoReload="true"
        throwExceptions="false"
        internalLogLevel="On" internalLogFile="c:\temp\nlog-internal.log"&gt;
    &lt;targets&gt;
      &lt;target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
              layout="${longdate} ${uppercase:${level}} ${message}" /&gt;
    &lt;/targets&gt;
    &lt;rules&gt;
      &lt;logger name="*" minlevel="Trace" writeTo="f" /&gt;
    &lt;/rules&gt;
  &lt;/nlog&gt;
  </code></pre>
  
  <p>And then i have followed the following <a href="https://github.com/NLog/NLog.Web/wiki/Getting-started-with-ASP.NET-Core-2" rel="nofollow noreferrer">tutorial</a>
  But i replaced </p>
  
  <pre><code>public static IWebHost BuildWebHost(string[] args) =&gt;
      WebHost.CreateDefaultBuilder(args)
          .UseStartup&lt;Startup&gt;()
          .ConfigureLogging(logging =&gt;
          {
              logging.ClearProviders();
              logging.SetMinimumLevel(Microsoft.Extensions.Logging.LogLevel.Trace);
          })
          .UseNLog()  // NLog: setup NLog for Dependency injection
          .Build();
  </code></pre>
  
  <p>with</p>
  
  <pre><code>public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;
      WebHost.CreateDefaultBuilder(args)
          .UseStartup&lt;Startup&gt;()
          .ConfigureLogging(logging =&gt;
          {
              logging.ClearProviders();
              logging.SetMinimumLevel(LogLevel.Trace);
          })
          .UseNLog();
  </code></pre>
  
  <p>But nothing is written to the specified file or the internal log no matter what i do.</p>
  
  <p>I have also tried to quickwatch <code>NLog.Web.NLogBuilder.ConfigureNLog("nlog.config")</code> and it seems no rules or targets are loaded?</p>
  
  <p><a href="https://i.stack.imgur.com/NDOIP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NDOIP.png" alt="enter image description here"></a></p>
  
  <p>I have also verified that nlog.config exists in the build directory <code>bin\Debug\netcoreapp2.1\</code> and as the right content.</p>
  
  <p>I have also tried to put the absolute path to the file in the <code>NLog.Web.NLogBuilder.ConfigureNLog</code> but that didn't help.</p>