title: Working with AppDomain.AssemblyResolve event
body: <p>I'm trying to use <code>AppDomain.AssemblyResolve</code> event to handle exceptions while resolving Assemblies of some dll loaded at runtime (<a href="https://stackoverflow.com/q/9162279/1061499">SerializationException for dynamically loaded Type</a>).</p>
  
  <p>When the event is fired, I load all DLLs in my directory and create an <code>Assembly</code> array, then I use this method to get the <code>Assembly</code> containing the type I specify:</p>
  
  <pre><code>public static Assembly GetAssemblyContainingType(String completeTypeName, 
                                                   Assembly[] assemblies)
  {
      Assembly assembly = null;
  
      foreach (Assembly currentassembly in assemblies)
      {
          Type t = currentassembly.GetType(completeTypeName, false, true);
          if (t != null)
          {
              assembly = currentassembly;
              break;
          }
      }
  
      return assembly;
  }
  </code></pre>
  
  <p>The problem is that this code works only with an <code>AssemblyQualifiedName</code>, and the <code>ResolveEventArgs.Name</code> provided by the event is not so useful.</p>
  
  <p>Can you suggest me some workaround?</p>
  
  <p>Is there a way to pass some other arguments to the event when it is fired?</p>