When developing apps, appdata is normally preserved through code/debug iterations. If, however, you change the manifest, the app is deployed anew and app data will be lost, because manifest changes trigger an uninstall and redeploy.

You can manually preserve the appdata, however, by simply copying the contents of your folder out of %localappdata%packages<your package>, making your manifest changes, rebuilding and running the app once, then copying the appdata back over. If you expect to be doing this a lot, it makes sense to write yourself a little batch file for the process; otherwise, consider making a copy of the app data, then doing whatever work you need to in your manifest (and testing those iterations), then copy the app data back.

Do note that this is a different situation than updating an app from the Windows Store or side-loading an update. In those cases the deployment engine does not uninstall the previous version, so appdata is preserved. The uninstall happens only when Visual Studio redeploys after manifest changes.


  1. philk
    Posted May 24, 2013 at 9:22 pm | Permalink

    I think VS should offer an option to preserve app data when you change the manifest to allow testing of upgrade scenarios. Its a pain to have post-build steps for that!

    • Posted May 25, 2013 at 2:50 pm | Permalink

      Would be nice…I believe it’s somewhere on the list amongst all the other requests.