I am trying to read from a XML file in Windows 10 Universal App. StreamReader only takes Stream as argument. I used to do this with the file path in WinForms, WPF or MVC but I d
Indeed, Windows 10 and the sandbox has many limitations in where you can read from/write to.
This is not a Windows 10 App "Problem", but a Windows Store App Api change.
A common way to read a file in a Windows Store App is to use the StorageFile
:
StorageFile file =
await StorageFile.GetFileFromApplicationUriAsync("ms-appx:///yourFile.txt");
Take a look at this post, to get more information about reading files in windows 10.