title: LogManager.configuration is null
body: <p>I've added NLog using nuget to a project and added NLog.config.  I'm running the debugger and getting a <code>NullReferenceException</code> due to the fact <code>LogManager.Configuration</code> is null:</p>
  
  <p><code>LogManager.Configuration.AddTarget("sentinel", sentinalTarget);</code></p>
  
  <p>This line of code runs in a static constructor.</p>
  
  <ul>
  <li>NLog.config is located in the project root alongside the web.config.</li>
  <li>This occurs in visual studio debugger</li>
  <li>NLog.config property "Copy to output directory" = "Copy Always"</li>
  <li>I updated NLog.config throwExceptions="true" and at runtime <code>LogManager.ThrowExceptions</code> was false so I suspect an issue with the config</li>
  <li>Tried removing the targets with name: viewer, DbWin and their associated rules</li>
  </ul>
  
  <p>NLog.config contents:</p>
  
  <pre><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"
        autoReload="true"
        throwExceptions="false"&gt;
  
    &lt;variable name="appName" value="YourAppName" /&gt;
  
    &lt;targets async="true"&gt;
      &lt;target xsi:type="File"
              name="default"
              layout="${longdate} - ${level:uppercase=true}: ${message}${onexception:${newline}EXCEPTION\: ${exception:format=ToString}}"
              fileName="${specialfolder:ApplicationData}\${appName}\Debug.log"
              keepFileOpen="false"
              archiveFileName="${specialfolder:ApplicationData}\${appName}\Debug_${shortdate}.{##}.log"
              archiveNumbering="Sequence"
              archiveEvery="Day"
              maxArchiveFiles="30"
              /&gt;
  
      &lt;target xsi:type="EventLog"
              name="eventlog"
              source="${appName}"
              layout="${message}${newline}${exception:format=ToString}"/&gt;
  
      &lt;target xsi:type="NLogViewer"
              name="viewer"
              address="udp://127.0.0.1:9999"/&gt;
  
      &lt;target xsi:type="OutputDebugString" name="DbWin" layout="Log4JXmlEventLayout"&gt;
        &lt;layout xsi:type="Log4JXmlEventLayout" /&gt;
      &lt;/target&gt;
    &lt;/targets&gt;
    &lt;rules&gt;
      &lt;logger name="*" writeTo="default" minlevel="Info" /&gt;
      &lt;logger name="*" writeTo="eventlog" minlevel="Error" /&gt;
      &lt;logger name="*" minlevel="Debug" writeTo="viewer" /&gt;
      &lt;logger name="*" minlevel="Trace" writeTo="DbWin" /&gt;
    &lt;/rules&gt;
  &lt;/nlog&gt;
  </code></pre>
  
  <p><strong>Update</strong><br />
  I discovered the source.  The issue occurs only when running unit tests.  Running the full application (web app) the issue is not there.  I copied the NLog.config file to the unit test home directory.  The issue is still there when running unit tests.</p>