title: Get actual dll path in .Net
body: <p>I have a dll named JIMS.Printing.dll which is placed inside the Reporting folder of the main application JIMS.exe.</p>
  
  <p>But I am getting an error when calling some files inside the Templates folder inside JIMS.Printing.dll code inside of Reporting which running JIMS.exe</p>
  
  <pre><code>JIMS.exe
  ---------&gt;Reporting
  -------------------&gt;JIMS.Printing.dll
  -------------------&gt;Templates
  -----------------------------&gt; Files
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>string _templatePath = Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(typeof(JIMS.Printing.PrintInvoice)).Location), "Templates");
  </code></pre>
  
  <p>Code from JIMS.Printing.dll</p>
  
  <p>JIMS.exe looking for Files inside JIMS.exe Path\Templates\file,
  But actually the file is in JIMS.Printing.dll Path\Templates\files</p>