I have a program written in Unity using C# that initializes a new StreamReader and proceeds to read the text data from a text file I have stored in Unity\'s resources folder. Ev
I agree with the others, this is likely caused by a diffence between mono in the editor and the .net that you are compiling with to get a UWP application. Try this instead:
using(StreamReader sr = new StreamReader(new FileStream(Application.dataPath + metadata, FileMode.Open)))
This should be legal mono and .net code.
The API differs in some cases between Unity Mono and .NET on UWP. It could be the StremReader(string) ctor is missing from the UWP version.
For instance, I had a case where Delegate.CreateInstance works in Editor but fails on Hololens and requires a different version.
You can wrap things in macros or use the one UWP requires.