Updating existing app with new certificate UWP

Schröders IT 6 Reputation points
2020-01-12T15:06:26.517+00:00

Hi,

I am developing a UWP application that is using the sideloading feature to install and update the application. My company recently got a new code signing cerrtifcate since the old one expired. With the new certificate some of the entries in the certificates subject field changed and with that the package family name.
That means that when I publish a new version of my app I get a prompt to install instead of update and a new independent instance of the app is installed. My main problem with this is the data that is stored in the apps local state folder that in my case contains settings and user generated data.
Is there any way to get around this problem and update my existing app or migrate the data of the old instance to the new?

Best regards
Alexander

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

1 answer

Sort by: Most helpful
  1. Roy Li - MSFT 33,486 Reputation points Microsoft Vendor
    2020-01-13T03:17:44.037+00:00

    Hello,

    Welcome to Microsoft Q&A!

    Since the system considered the app as the new app due to that the app's package family name has been changed, that means common ways that storing the data will fail like roaming data and local data from this new app to the old app.

    If you have a server, that will be easy to transfer data between the old app and the new app. Just uploading the data by user and download it for the new app. But if you don't have a server, you might need to use a complicated way. You might need to save the data files from the old app in some places like Document Library. Then pick the files in the new app and save them into the local folder of the New app.

    Another way for this issue is that do not change the app's package family name when you try to change a new certificate. The package family name is computed from the package name and certificate's subject's hashed info, so if the certificate's subject keeps same, then the package family name will keep same as well.

    Hope it helps.

    Thanks.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.