title: Referencing dll-files from subfolder in library project
body: <p>I am writing a C# Library-Project which includes other libraries. This libraries should be stored in a subfolder "lib".</p>
  
  <p>Let's say my project is called mylib and the other libraries are called extralib. Than the directory looks like this:</p>
  
  <pre><code> lib/extralib1.dll
   lib/extralib2.dll
   ...
   mylib.dll
  </code></pre>
  
  <p>I now wrote a C#-Console-Application:
  I call a function from mylib.dll, which calls functions from extralibs. Everything works fine, when I use an app.config file like this:</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;probing privatePath="lib"/&gt;
         &lt;/assemblyBinding&gt;
     &lt;/runtime&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>But the problem is when I use mylib.dll for example in MatLab. The references to the extralibs are not working. The only work, when I save them all in the same folder. And that is what I don't want to do.</p>
  
  <p>So the point is adding lib to the private path in the console application is not a good solution! I have to add the extra libs to the private path inside the mylib.dll.</p>
  
  <p>Do you have an idea how to do this? Or maybe is there a better way to solve this?</p>