title: Reference a DLL from another DLL
body: <p>I have a C# application program, let's call it App.exe. It references a DLL named A.dll which in turn references another DLL, namely, B.dll. However the way in which they are referenced is a bit different. In the code of A.dll, it has directly referenced B.dll (by going to Project > References > Add B.dll). However my App.exe has code to load A.dll at runtime using Assembly.Load() etc.</p>
  
  <p>So to recap, </p>
  
  <blockquote>
    <p>App.exe ---- (runtime loading) ---> A.dll ---- (direct reference) ---> B.dll</p>
  </blockquote>
  
  <p>All three things (App.exe, A.dll and B.dll) reside in the same directory, let's say ExeDir. Now what I want to do is, put A.dll and B.dll in a sub directory of ExeDir. I can do this by using an App.config file that specify the path of A.dll and asking the App.exe to load A.dll from that path. So far so good.</p>
  
  <p>However the problem is that when I do this, .NET gives me an error saying that it cannot find B.dll which is in the same directory as A.dll. If I move it back to the original directory (the same directory as App.exe) then it works fine. Which means, I can put A.dll in a sub directory, but the B.dll needs to be in the original directory. </p>
  
  <p>Is there any way in which I can keep both DLLs in the sub directory?</p>