title: Assembly not loaded c#
body: <p>I have a project <code>Common</code> which contains a log4net CustomAppender. I reference the project in all my other projects and configure log4net appender in <code>app.config</code>. Everything works smooth except for one project which fails when trying to instantiate the Appender.</p>
  
  <p>The output shows the following error: </p>
  
  <pre>
  System.TypeLoadException: Could not load type [Common.Appenders.MyCustomAppender].
  Tried assembly [log4net, Version=1.2.11.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a]
  and all loaded assemblies
  at log4net.Util.SystemInfo.GetTypeFromString(Assembly relativeAssembly, String typeName, Boolean throwOnError, Boolean ignoreCase)
  at log4net.Util.SystemInfo.GetTypeFromString(String typeName, Boolean throwOnError, Boolean ignoreCase)
  at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(XmlElement appenderElement)
  log4net:ERROR Appender named [MyCustomAppender] not found.
  </pre>
  
  <p>The log4net configuration is the same for all project. <code>app.config</code> contains:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;configSections&gt;
      &lt;section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /&gt;
    &lt;/configSections&gt;
    &lt;log4net&gt;
      &lt;appender name="MyCustomAppender" type="Common.Appenders.MyCustomAppender"&gt;
        &lt;file value="log.txt" /&gt;
        &lt;layout type="log4net.Layout.PatternLayout"&gt;
          &lt;conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" /&gt;
        &lt;/layout&gt;
      &lt;/appender&gt;
      &lt;root&gt;
        &lt;level value="DEBUG" /&gt;
        &lt;appender-ref ref="MyCustomAppender" /&gt;
      &lt;/root&gt;
    &lt;/log4net&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>From code I call <code>log4net.Config.XmlConfigurator.Configure()</code>. If I manually load the assembly using <code>Assembly.Load("Common")</code> before calling log4net configure for the non-working project everything is fine.</p>
  
  <p>Any idea why the assembly is not loaded when <code>MyCustomAppender</code> is instantiated via reflection? How can I solve this?</p>