title: Assembly.LoadFrom with path and full assembly name
body: <p>I am trying to implement dynamic loading of certain assemblies based on <code>Environment.Is64BitProcess</code>.<br>
  This basically works like this:</p>
  
  <ul>
  <li>Register an event handler for the <a href="http://msdn.microsoft.com/en-us/library/system.appdomain.assemblyresolve.aspx" rel="nofollow"><code>AppDomain.AssemblyResolve</code> event</a></li>
  <li><p>In the event handler load the assembly from the CPU type dependent sub path:</p>
  
  <pre><code>private Assembly OnAssemblyResolve(object sender, ResolveEventArgs args)
  {
      // args.Name is the display name of an assembly, e.g.:
      // MyAssembly, Version=5.0.0.0, Culture=neutral, PublicKeyToken=abcdefghijklmn
      if(!args.Name.Contains("MyAssembly"))
          return null;
  
      var path = Path.Combine(GetCpuTypeDependentPath(), "MyAssembly.dll");
      return Assembly.LoadFrom(path);
  }
  </code></pre></li>
  </ul>
  
  <p>Now, this has the problem, that it doesn't check for the version, publicKeyToken etc of the loaded assembly.<br>
  What I would like to do now is to call <code>Assembly.Load</code> and simply supply an additional probing path. I know that this doesn't work as there is no such overload. Is there some other way to achieve my goal?</p>