Matthew The Terrible
Matthew The Terrible

Reputation: 1643

UWP app where to put static xml file in app

I have a UWP app I'm working on and in that app I have an .XML file that I need to read from sometimes. I've just been hard coding the location of the file while debugging but now that I want to try to run the app on a remote device I need do actually put that file somewhere and be able to read from it.

Is there a place where this file should go where whether I'm running the project locally or on a remote device I'll have access to?

Upvotes: 0

Views: 503

Answers (1)

mindOfAi
mindOfAi

Reputation: 4622

You can actually put it anywhere inside your project. It's perfectly fine. Check this out: http://www.c-sharpcorner.com/article/read-xml-file-in-windows-10-universal-app/

But the other thing that I'd suggest to you is to save the XML file in the local storage: http://jamescroft.co.uk/blog/uwp/how-to-implement-local-storage-in-universal-windows-apps/

Hope it helps!

Upvotes: 3

Related Questions