Is local storage deleted when a user updates my application?

I have an application for Windows 8 (Digital Nightstand) in the appstore windows 8. The application stores user settings in XML files on a user's computer, also known as local storage. I want to know that if I release an update for my application and users make an update, will the existing stored settings be erased?

+4
source share
3 answers

The answer is no!

Do not worry, when the user updates the application, local and roaming folders / settings will not be destroyed.

+7
source

Data is not deleted. But if you released the update and if you changed the version of the data warehouse, then you need to have a mechanism for copying data from version 0 to version 1.

You can optionally specify application data for your application. This will allow you to create a future version of your application that changes the application data format without causing compatibility issues with a previous version of your application. The application checks the version of the application data in the data warehouse, and if the version is less than the version expected from the application, the application must update the application data to a new format and update the version. For more information, see Application.Version Property and ApplicationData.SetVersionAsync Method.

The sample application data http://code.msdn.microsoft.com/windowsapps/ApplicationData-sample-fb043eb2 contains code for the version that should be useful to you.

Versioning: Application data can use versioning of application data to move from one data structure to another. The version number is different from the version of the application and can be set as desired. Although this is not respected, it is strongly recommended that only increasing version numbers be used, since an undesirable situation, including data loss, may occur when switching to a lower version number of the data representing newer data. Please note that application data is only moved between applications with the same version number. For example, devices of version 2 will transfer data between themselves, and devices on version 3 will do the same, but there is no automatic transition between devices of version 2 and version 3. This applies to the application when updating the version number. Installing a new application that previously used different version numbers on other devices will start working with available data with the highest version number.

+5
source

After the update, the data is not saved. I know that this happens when you change the manifest file in the visual studio, but not when the application is updated through the market.

+3
source

Source: https://habr.com/ru/post/1445443/


All Articles