Load xml file from bin folder-Collection of common programming errors
msdn Hi, I am new in WP development. I load a xml file usingXDocument loadedData = XDocument.Load(
"Contact.xml"
)
Now I want to load this file from bin directory.
-
10 Answers
msdn1 Hi, There is no bin directory inside a Windows Phone unless you created one yourself. Here are the local phone storage options: 1. As part of your build (the collection of files in your built XAP file; you can inspect the .XAP contents by renaming it to a .ZIP file). You can place resources there as “content”, i.e. stand alone files, or as “resource”, i.e. inside a DLL. All of these files are read-only. 2. In Isolated Storage. Files and folders within can be read-write. Hope this helps,Mark
msdn2Isolated storage on the emulator is not persistent.
IIRC it persists as long as the emulator isn’t shut down. It should persist between executions of the game.
msdn3 Hi, Isolated Storage is the only way to store new data permanently (into flash memory in the phone). The only thing that is more permanent is the application package itself, deployed to the phone via the XAP (also in flash memory but in an area that the developer cannot change; it is read only).– Mark
msdn4 HI, I have seen some example of isolated storage, but it doesn’t store data permanently.
msdn5
msdn6it doesn’t store data permanently
Huh?
msdn7 Hi Jim, I have created a project using isolated storage. where i created a xml file and save some data into it and show those data at application runtime. When i run the app later and try to only show data, it shows empty.
msdn8 Then you are doing something wrong. Items in isolated storage remain until they are deleted or the application that created them is deleted. Are you perhaps testing on the emulator? Isolated storage on the emulator is not persistent.
msdn9Isolated storage on the emulator is not persistent.
IIRC it persists as long as the emulator isn’t shut down. It should persist between executions of the game.
msdn10Isolated storage on the emulator is not persistent.
IIRC it persists as long as the emulator isn’t shut down. It should persist between executions of the game.
YRC 😉