locked
Data is not persisted between builds RRS feed

  • Question

  • User377412 posted

    Hello, I have a xamarin forms application and i want to save some parameters locally. I tried with SettingsPlugin and SqlLite. The problem is the same. If I debug the application from VS all the local data is cleared everytime. If i just run the deployed app from my device then both method works.

    I have the "preserve application data cache on device between builds' checked.

    What i am doing wrong?

    Tuesday, June 25, 2019 12:06 PM

All replies

  • User382871 posted

    If I debug the application from VS all the local data is cleared everytime. If i just run the deployed app from my device then both method works.

    Sure, if you debug the application from VS which means you reinstall the app. The data will not be saved because you've install a new application.

    Tuesday, June 25, 2019 1:54 PM
  • User377412 posted

    @yelinzh said:

    If I debug the application from VS all the local data is cleared everytime. If i just run the deployed app from my device then both method works.

    Sure, if you debug the application from VS which means you reinstall the app. The data will not be saved because you've install a new application.

    Are you sure about this? When i debug i always see some old values i had saved. Not the new ones. But also not all the data is cleared

    Tuesday, June 25, 2019 1:58 PM
  • User382871 posted

    Have you tried to debug the application on a real machine from VS?

    Tuesday, June 25, 2019 2:40 PM