title: Using Codebase to load assembly
body: <p>Based on <a href="https://stackoverflow.com/questions/8552380/call-dll-files-located-in-another-directory">this question</a>, I tried using <code>&lt;codebase&gt;</code> to locate an external assembly. Now, when I run the program, I get an error message saying that the private assembly was located outside the appbase. How can I fix this issue? One suggestion I saw said to sign the assembly. I did this, but then my program couldn't find the assembly. When I unsigned it, I get the <code>outside the appbase</code> error. How do I load an assembly that's located elsewhere using <code>&lt;codebase&gt;</code> and not installing to the GAC? (Probing didn't work either and it seems that it still has to be present within the application folder)
  My config file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
        &lt;dependentAssembly&gt;
  
          &lt;assemblyIdentity name="NGameHost"
  
                            culture="neutral" /&gt;
          &lt;codeBase version="1.0.0.0" 
                    href="C:/Program Files/NetworkGame3/api/NGameHost.exe"/&gt;
        &lt;/dependentAssembly&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  
  &lt;/configuration&gt;
  </code></pre>