StoreContext.RequestDownloadStorePackageUpdatesAsync Method


Attempts to download the specified package updates for the current app from the Microsoft Store. This method also displays a UI dialog that requests permission for the operation.


This method must be called on the UI thread.

 virtual IAsyncOperationWithProgress<StorePackageUpdateResult ^, StorePackageUpdateStatus> ^ RequestDownloadStorePackageUpdatesAsync(IIterable<StorePackageUpdate ^> ^ storePackageUpdates) = RequestDownloadStorePackageUpdatesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<StorePackageUpdateResult, StorePackageUpdateStatus> RequestDownloadStorePackageUpdatesAsync(IIterable<StorePackageUpdate> const& storePackageUpdates);
public IAsyncOperationWithProgress<StorePackageUpdateResult,StorePackageUpdateStatus> RequestDownloadStorePackageUpdatesAsync(IEnumerable<StorePackageUpdate> storePackageUpdates);
function requestDownloadStorePackageUpdatesAsync(storePackageUpdates)
Public Function RequestDownloadStorePackageUpdatesAsync (storePackageUpdates As IEnumerable(Of StorePackageUpdate)) As IAsyncOperationWithProgress(Of StorePackageUpdateResult, StorePackageUpdateStatus)





The set of StorePackageUpdate objects that represent the updated packages to download.



An object that the caller can observe to track progress and completion for the operation. On successful completion, the result is a StorePackageUpdateResult object that provides info about the package updates.



If the ErrorCode property of the exception has the value 0x80070578 (ERROR_INVALID_WINDOW_HANDLE), this indicates that the method was not called on the UI thread. If you are calling this method in a desktop application that uses the Desktop Bridge, this can also indicate that you did not configure the <xref:Windows.Services.Store.StoreContext?text=StoreContext> object to specify which application window is the owner window for modal dialogs shown by this method. For more information, see this article.


To get the list of packages that have updates available, use the GetAppAndOptionalStorePackageUpdatesAsync method. After you download the packages, you can install them by using the RequestDownloadAndInstallStorePackageUpdatesAsync method. For more information about using this method, including a code example, see Download and install package updates for your app.

This operation will not block. The IAsyncOperationWithProgress object returned by this method will complete after the update packages are downloaded.

When you call this method, the OS displays a dialog that tells the user that an app update is available to download and asks the user's permission to proceed with the download. If the user does not grant permission to start the download, the OverallState property of the StorePackageUpdateResult return value has the value Canceled.

The method that you assign to handle Progress notifications is called one time for each step in the download process for each package in this request. The Progress handler receives a StorePackageUpdateStatus argument that provides info about the update package that raised the progress notification.

Applies to

See also