Get Absolute Path Relative to DLL location <p>I have a dll that depends on some external files. I have relative paths (relative to the dll location) to those files.</p> <p>I need to be able to load/read those files from the DLL.</p> <p>To find the absolute path to the files I was using:</p> <pre><code>System.IO.Path.GetFullPath(filePath); </code></pre> <p>It seemed to be working, but I found that this is actually returning a path relative to the 'current directory'. I found that the current directory changes at some point from the dll location (and may never even be the dll path).</p> <p>What's the easiest way to get the absolute path of the files relative to the DLL from code running in the DLL?</p> <p>I was going to use the following, but found that it returns the path to the EXE that has loaded the DLL, not the DLL path:</p> <pre><code>AppDomain.CurrentDomain.BaseDirectory </code></pre>