Search code examples
uwpwindows-10-universalwindows-store

Testing UWP app in development that uses GetAppAndOptionalStorePackageUpdatesAsync to check for store updates


I'm adding code to my UWP app that will detect if mandatory updates are available and automatically download and install them. This app is being deployed by Microsoft Store for Business as an LOB app once it is ready for production use. During development I have not been able to run the app on my local machine from Visual Studio when I include code that checks for updates.

For instance when I execute this line of code:

IReadOnlyList<StorePackageUpdate> updates = await context.GetAppAndOptionalStorePackageUpdatesAsync();

The debugger just goes out to lunch. The CPU activity from the app drops to 0% and the memory usage goes flat.

I was hoping that I could implement the check for updates in the app and still be able to develop it locally, but I'm really missing something.

Appreciate any and all suggestions. Thanks!


Solution

  • The official doc has implement an article about how we can testing the in app purchase function by associate your app with the dashboard. You can check it from here. The storecontext object need a license to get it works on your current computer. What about give these steps a test? Is it what you want?