Alexander Ciesielski
Alexander Ciesielski

Reputation: 10834

local storage settings reset after every launch

I'm saving some settings to the local storage

 ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;

but every time I relaunch the app and try to read the saved values they are gone. How can I make VS remember the settings I save in local storage?

Upvotes: 0

Views: 730

Answers (2)

QBM5
QBM5

Reputation: 2788

2 things

  1. When you "Rebuild" the app, it will wipe out the isolated storage regardless of how you save it.
  2. You must make sure you are calling the save method on the storage object after you make your update.

I am not sure if this applies Win Runtime, but that is usually the issue with windows phone storage.

Hope this helps

Upvotes: 0

Jim O'Neil
Jim O'Neil

Reputation: 23764

Do you have the following option selected on your Debug tab for your Windows Store app project? If so.. don't :)

enter image description here

Upvotes: 1

Related Questions