I have completely rewritten one of my Windows phone 8 app. I use IsolatedStorageSettings to store user specified settings in both "old" and "new" versions of my app. In my new app version I just convert the old settings structure to new one.
Now I want to test the app update case. So far I have tried the following.
- Build "old" and "new" xap files using VS (same app id and publisher id).
- Install the old xap using WP Power Tools
- Save some settings in app, check using WP Power Tools that the settings are saved to __ApplicationSettings
- Update the app xap file using WP Power Tools
- Check that the __ApplicationSettings is still there with "old" data
- Launch the new app, __ApplicationSettings is now empty and all old data has gone.
What im doing wrong? Ho should I test the app update case, and how to keep the old __ApplicationSettings in place?
Is there some id's (?) which are now different in my old and new app and the platform thinks that the old __ApplicationSettings does not belong to new version and deletes it? Im using completely new namespace in my new app.
UPDATE
Im still struggling with this issue, how how to keep old isolated storage settings (__ApplicationSettings). In the file itself there is references to my app namespace. For example I have saved collection of MyCollectionItem's, in the __ApplicationSettings I find line:
System.Collections.Generic.List`1[[MyOldApp.MyModels.MyCollectionItem, MyOldApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxx
Now as my new app uses completely new namespace, this is not working?
Also I noticed that when I first time save something to IsolatedStorageSettings with my new app, the old settings (__ApplicationSettings) are erased.
Any idea how to migrage the IsolatedStorageSettings from old app to new one, as basically my new app is completely new app.