UWP Windows 10 app update

Madhu 96 Reputation points
2020-01-07T14:31:27.03+00:00

Hi,

Is there a way to know when the UWP app get updated and user access the app for the first time after the update.
If I need to copy certain files or to do some other action after a update for the first time user access the app, what is the best way to do that?

Also after an update it'll not affect any of the existing data in these. Is that correct?

  • ApplicationData.LocalSettings
  • Sqlite data
  • Files in the Localstate folder

Thanks
Madhu

Universal Windows Platform (UWP)
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,856 Reputation points
    2020-01-07T15:31:21.89+00:00

    Is there a way to know when the UWP app get updated and user access the app for the first time after the update.

    We provide Update Task background task that invokes a background task after the app is updated on the device. This document details how to register the background task to run when the app is updated.

    In general, we store the current app's version number into the LocalSettings . Every time we start the application, we check the version of the application and compare it with LocalSettings . You can get package version with the PackageVersion api.

    2 people found this answer helpful.