title: Application.GetResourceStream can't file the file in the Uri
body: <p>I'm trying to access a .js file.
  The file is located inside <strong>Database</strong> folder and named <strong>myfile.js</strong> which is just a JSON formatted text-file.</p>
  
  <p>This is the code I'm using (this is run from <strong>MainPage.xaml.cs</strong>:</p>
  
  <pre><code>Uri uri = new Uri("/Database/myfile.js", UriKind.Relative);
  var resource = Application.GetResourceStream(uri);
  
  StreamReader streamReader = new StreamReader(resource.Stream);
  string rawData = streamReader.ReadToEnd();
  </code></pre>
  
  <p>It always throw an exception of <code>NullReferenceException</code> because the <code>resource</code> variable is null.</p>
  
  <p>So, the problem is in the Uri. I tried to use:</p>
  
  <pre><code>@"/Database/myfile.js"
  "/Database/myfile.js"
  "/LQI;component/Database/myfile.js"
  </code></pre>
  
  <p>But it doesn't work.
  When I tried to move my file to root directory and replace the Uri string with </p>
  
  <pre><code>@"myfile.js"
  </code></pre>
  
  <p>it works! But I don't want that.</p>
  
  <p>I also tried to rename the extension become .txt but nothing.</p>
  
  <p>Please help.
  Thanks!    </p>
  
  <p>Edit: I set the Build Action to "Content" which is default. I tried to set it to "Resource" but it doesn't work neither.</p>
  
  <p>Edit #2: Okay, I found a clue (<a href="https://stackoverflow.com/a/12122332/2649132">https://stackoverflow.com/a/12122332/2649132</a>) that the <code>LQI;component/Database/myfile.js</code> only work when I set the item into Resource. And it does work.
  But, the question will be still open since I doesn't work when I set the build action to "Content" with regular path.</p>