locked
Loading Xml File into StorageFile error RRS feed

  • Question

  • I have 2 files (an image and an XML file) in a UWP app Build 16299.

    Both have properties set to Content and Copy If Newer. I run the code below. The image loads fine, the XML document gives me a FileNotFoundException

     private async void LoadFiles()
            {
                var file1 = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Tools.PNG"));
                var file2 = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///VoiceCommands.xml"));
            }

    Why can't it load the XML file?

    Thursday, November 16, 2017 12:31 PM

Answers

All replies