question

zipswich avatar image
0 Votes"
zipswich asked ·

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

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.


windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
1 Vote"
RoyLi-MSFT answered ·

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.


· 2 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks a lot, Roy.
I will test this after Thanksgiving and report back then.

0 Votes 0 ·

If you have any other questions, please feel free to contact us.

0 Votes 0 ·