title: Common.logging doesn't pick up the App.config in a class library
body: <p>The class library project has a App.config file as given:</p>
  
  <pre><code>&lt;configuration&gt;
      &lt;configSections&gt;
          &lt;sectionGroup name="common"&gt;
              &lt;section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /&gt;
          &lt;/sectionGroup&gt;
          &lt;section name="nlog" type="NLog.Config.ConfigSectionHandler, NLog" /&gt;
      &lt;/configSections&gt;
      &lt;common&gt;
          &lt;logging&gt;
              &lt;factoryAdapter type="MyApp.Logging.NLog2FactoryAdapter, MyApp.Logging"&gt;
                  &lt;arg key="configType" value="INLINE" /&gt;
              &lt;/factoryAdapter&gt;
          &lt;/logging&gt;
      &lt;/common&gt;
      &lt;nlog xmlns="http://www.nlog-project.org/schemas/NLog.netfx40.xsd"&gt;
          &lt;extensions&gt;
              &lt;add assembly="MyApp.Logging" /&gt;
          &lt;/extensions&gt;
          &lt;targets async="true"&gt;
              &lt;target type="Console" name="ConsoleTarget" layout="${longdate}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=8}" /&gt;
              &lt;target type="File" name="FileTarget" fileName="C:\Users\liangj\Desktop\log.log" layout="${longdate}|${level:uppercase=true}|${logger}|${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=8}" /&gt;
              &lt;target type="JsonNetwork" name="SplunkTarget" address="tcp4://log-staging.dbrs.local:10500" newLine="true" layout="${message} ${exception:format=tostring:innerFormat=tostring:maxInnerExceptionLevel=8}" /&gt;
          &lt;/targets&gt;
          &lt;rules&gt;
              &lt;logger name="*" minlevel="Debug" writeTo="SplunkTarget,ConsoleTarget,FileTarget" /&gt;
          &lt;/rules&gt;
      &lt;/nlog&gt;
      &lt;appSettings&gt;
          &lt;add key="AppVersion" value="2.1" /&gt;
      &lt;/appSettings&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>In the c# code, I have:</p>
  
  <pre><code>public static void WriteLog(string msg, IDictionary&lt;string, object&gt; metadata)
  {    
      Configuration Configuration = ConfigurationManager.OpenExeConfiguration(new Uri(Assembly.GetExecutingAssembly().CodeBase).AbsolutePath);
      string version = Configuration.AppSettings.Settings["AppVersion"].Value.ToString();
      string LogTime = DateTime.Now.ToString("yyyy-M-dd H:mm:ss tt");
      metadata["LogTime"] = LogTime;
      Console.WriteLine(version );
      Console.WriteLine(Logger.Log.ToString());
      Logger.Log.InfoWithMetadata(msg, metadata);
  }
  </code></pre>
  
  <p>The way this class library used is that it will be imported into PowerShell which adds custom cmdlets to it. When I open powerShell and execute the custom cmdlet, the open shows that the Logger is a taken as a default logger which doesn't do anything, but I do expect a proper logger to log to files.</p>
  
  <p>I doubt that since this is a class library, it automatically generates a solutionName.dll.config file, which is not recognized by common.Logging, which may expects a exe.config instead?</p>