title: File ReadAllText is getting a wrong path (C#)
body: <p>I have a local project that in the future will be in a pipeline.
  Because of this, I need to use a relative path to get and read a json file.
  But using the <strong>File.ReadAllText</strong> I'm obtaining the following answer:</p>
  <pre><code>&gt; File.ReadAllText(&quot;MyJsonFiletoRead.json&quot;, Encoding.Default) 
  System.IO.FileNotFoundException: Could not find file 'C:\Users\15071\MyJsonFiletoRead.json'
  </code></pre>
  <p>Note that 'C:\Users\15071' is not the project folder, this is my windows user folder.
  My struct is here:</p>
  <pre><code>C:\Projetcs\MyProjectTest  --&gt;&gt; Project folder
  
  C:\Projetcs\MyProjectTest\MyClass.cs  --&gt;&gt; The class where I'm calling the ReadAllText
  
  C:\Projetcs\MyProjectTest\MyJsonFiletoRead.json --&gt;&gt; My json file that I'm trying to find
  </code></pre>
  <p>I have tried the following commands to check my PATH, but all answer is wrong:</p>
  <pre><code>&gt; Environment.CurrentDirectory
   &quot;C:\\Users\\15071&quot;
  
  &gt; Directory.GetCurrentDirectory()
   &quot;C:\\Users\\15071&quot;
  
  AppDomain.CurrentDomain.BaseDirectory
  &quot;c:\\program files (x86)\\microsoft visual studio\\2019\\community\\common7\\ide\\commonextensions\\microsoft\\managedlanguages\\vbcsharp\\languageservices\\DesktopHost\\&quot;
  </code></pre>
  <p>Has somebody a solution to fix this?</p>
  <p>Note: If I use the full path, it works:</p>
  <pre><code>File.ReadAllText(&quot;C:/Projetcs/MyProjectTest/MyJsonFiletoRead.json&quot;, Encoding.Default)
  </code></pre>