title: Loading dlls from a different directory using "probing"
body: <p>When compiling a C# project which has external references, the referenced dlls are being copied to the project's output path (next to the exe).</p>
  
  <p>When running the application, it expects to find the dlls next to the exe.</p>
  
  <p>I'm looking for a way to spread my dll files into different directories Dlls for starters). And have the exe look for the dll files in those directories.</p>
  
  <p><strong>Example:</strong> </p>
  
  <p>Let's say we have an application called "App" located under <code>C:\App\App.exe</code>, and also it uses a dll file called "App.dll" which is currently also located under <code>C:\App</code>.</p>
  
  <p>I wish to create a new directory called <code>C:\App\Dlls</code> and move the App.dll file to there, while making sure that the App.exe file will know to look for the dll in the new location.</p>
  
  <p>I've searched the internet and found the probing solution. Here's my code (edited "App.config" file):</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;configuration&gt;
      &lt;startup&gt; 
          &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" /&gt;
      &lt;/startup&gt;
    &lt;runtime&gt;
      &lt;assemblyBinding xmlns="urn:schemas=microsoft-com:asm.v1"&gt;
        &lt;probing privatePath="Dlls" /&gt;
      &lt;/assemblyBinding&gt;
    &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I compiled my application, created the Dlls directory and moved all the dll files to that directory, but the application crashes.</p>
  
  <p>What am I missing?</p>