 <p>You should use reflection to get into relative path:</p> <pre><code>public static string PredictAbsoluteFilePath(string fileName) { return Path.Combine(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), fileName); } </code></pre> <p>You can use it like this:</p> <pre><code>string path = Utils.PredictAbsoluteFilePath("relativeFile.xml"); //assuming that currect executing file is in D:\Programs\MyApp directory //path is now 'D:\Programs\MyApp\relativeFile.xml' </code></pre>