title: Embedding one dll inside another as an embedded resource and then calling it from my code
body: <p>I've got a situation where I have a DLL I'm creating that uses another third party DLL, but I would prefer to be able to build the third party DLL into my DLL instead of having to keep them both together if possible.</p>
  
  <p>This with is C# and .NET 3.5.</p>
  
  <p>The way I would like to do this is by storing the third party DLL as an embedded resource which I then place in the appropriate place during execution of the first DLL.</p>
  
  <p>The way I originally planned to do this is by writing code to put the third party DLL in the location specified by <code>System.Reflection.Assembly.GetExecutingAssembly().Location.ToString()</code> 
  minus the last <code>/nameOfMyAssembly.dll</code>. I can successfully save the third party <code>.DLL</code> in this location (which ends up being </p>
  
  <blockquote>
    <p>C:\Documents and Settings\myUserName\Local Settings\Application
    Data\assembly\dl3\KXPPAX6Y.ZCY\A1MZ1499.1TR\e0115d44\91bb86eb_fe18c901 </p>
  </blockquote>
  
  <p>), but when I get to the part of my code requiring this DLL, it can't find it.</p>
  
  <p>Does anybody have any idea as to what I need to be doing differently?</p>