Share via

[UWP][C#] How to check updates of a side-loaded app in code?

Hong 1,211 Reputation points
Nov 27, 2019, 2:26 PM

One can set up auto-updates for a side-loaded UWP app . This means the update checking function is already there. How can this update checking function be called in code?

I do not plan to use auto-updates and would like to have a button for users to click to check updates manually.

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

1 answer

Sort by: Most helpful
  1. Roy Li - MSFT 33,471 Reputation points Microsoft Vendor
    Nov 28, 2019, 3:22 AM

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Have you check the Package.GetAppInstallerInfo Method and the Package.CheckUpdateAvailabilityAsync Method?

    The first one could get the URI from the .AppInstaller. If a user who already has the app clicks the URI, the app is updated if needed and then it opens. If a user who doesn't have the app clicks the URI, they are taken through the install process for the app.

    The second one could help you to check if an update is available from the server indicated in the .AppInstaller.

    1 person found this answer helpful.

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.