title: Loading TXT file in Windows Phone 8.1
body: <p>Thanks to the below link, I've found out how to load a TXT file into my Windows Phone 8.1 app.  My question is specifically tied to WHY my code doesn't work.  (My code begins after link to the other StackOverflow question).</p>
  
  <p>This is the same question, with a working answer.
  <a href="https://stackoverflow.com/questions/23924424/read-text-file-in-project-folder-in-windows-phone-8-1-runtime">Read text file in project folder in Windows Phone 8.1 Runtime</a></p>
  
  <p>I set the StorageFile as the relative location of the file on the phone.  I then try and use that location to open a StreamReader.  This small snippet compiles fine, however on execution, encounters a runtime error, and "firstFile" is empty/null.</p>
  
  <pre><code>const string filename = "FileToRead.txt";
  
  StorageFile firstFile = await ApplicationData.Current.LocalFolder.GetFileAsync(fileName);
  
  using (StreamReader streamFirstFile = new StreamReader(await firstFile.OpenStreamForReadAsync())) 
          { 
          loadText_Button.Text = await streamFirstFile.ReadToEndAsync();
          }
  </code></pre>
  
  <p>To hopefully further clarify this specific question, are the following two lines of code the same, and if not, how am I using it wrong?</p>
  
  <pre><code>ApplicationData.Current.LocalFolder.GetFileAsync(fileName);
  
  StorageFile.GetFileFromApplicationUriAsync(new Uri(@"ms-appx:///Assets/FileToRead.txt"))
  </code></pre>
  
  <p>I even tried to set it as follows:</p>
  
  <pre><code>ApplicationData.Current.LocalFolder.GetFileAsync(String.Format("{0}{1}", "Assets/", fileName);
  </code></pre>
  
  <p>Thank you all in advance.</p>