title: System.IO relative path
body: <p>I am trying to read a file from my solution.  I want to know how to locate the file using a relative path.  My solution contains <em>3 projects</em>.  The file I want to read is located in <em>project A</em>, but the code that is reading it is located in <em>project B</em>.  If I use <code>..\file.txt</code> that will bring me to <em>Project B</em> rather than <em>Project A</em>.  If I use <code>Application.StartPath</code>
  I get </p>
  
  <p><em><code>C:\\Users\\Linda\\AppData\\Local\\Microsoft\\VisualStudio\\10.0\\Extensions\\tangible\\t4 editor\\2.1.1</code></em></p>
  
  <p>whereas I need to find the directory where I have developed the code <code>C:\Sp_CodeGenerator\...</code></p>
  
  <p>I have also tried using </p>
  
  <pre><code>Environment.GetFolderPath
  
  Directory.GetCurrentDirectory();
  System.IO.Path.GetDirectoryName(System.IO.Path.GetDirectoryName(Application.ExecutablePath))'`
  System.AppDomain.CurrentDomain.BaseDirectory.ToString();
  </code></pre>
  
  <p>but these all produce the same results and bring me to Visual Studio Program files rather than to where the solution has been created on the hard disk.</p>
  
  <p>Anything else I should try?</p>