windows-phone-8isolatedstorage

IsolatedStorageSettings life cycle in Windows Phone 8


I'm developing a windows phone 8 application. I want to store app related things like configuration settings, usernames, passwords etc. inside the application. For that I'm using IsolatedStorageSettings class.

Problems:

  1. When I clean the project and run in on the emulator, all stored values are gone.

  2. When I close the emulator and run it again, all stored values are gone.

Can someone please explain me why is this happening and how can I store them permanently?


Solution

  • This is default behavior of emulator. It is like simulation in memory to test debug app. it does not persist data/app on the emulator when you close it. And when you run the project again(emulator is not running) VS will lunch the emulator and reinstall the app again. that is why you do not find previously stored data in you isolated storage.

    And same is in the case of cleaning your project. Your app will be re installed on the emulator so all the previously persisted data on Isolated storage will be lost.

    In your case I will recommend to use device for debugging.

    Hope this helps.