PackageManager.StagePackageByUriAsync(Uri, StagePackageOptions) Method

Definition

Stages a Package to the system without registering it, using the specified deployment options.

public:
 virtual IAsyncOperationWithProgress<DeploymentResult ^, DeploymentProgress> ^ StagePackageByUriAsync(Uri ^ packageUri, StagePackageOptions ^ options) = StagePackageByUriAsync;
/// [Windows.Foundation.Metadata.Overload("StagePackageByUriAsync")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperationWithProgress<DeploymentResult, DeploymentProgress> StagePackageByUriAsync(Uri const& packageUri, StagePackageOptions const& options);
[Windows.Foundation.Metadata.Overload("StagePackageByUriAsync")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperationWithProgress<DeploymentResult,DeploymentProgress> StagePackageByUriAsync(System.Uri packageUri, StagePackageOptions options);
function stagePackageByUriAsync(packageUri, options)
Public Function StagePackageByUriAsync (packageUri As Uri, options As StagePackageOptions) As IAsyncOperationWithProgress(Of DeploymentResult, DeploymentProgress)

Parameters

packageUri
Uri Uri

The source URI of the main package.

options
StagePackageOptions

The package deployment options for the operation.

Returns

The status of the deployment request. The DeploymentResult contains the final returned value of the deployment operation, once it is completed. The DeploymentProgress can be used to obtain the percentage of completion over the entire course of the deployment operation.

Attributes

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Remarks

This method simplifies the existing StagePackageAsync overloads by consolidating all of the deployment options into a single parameter. This method also supports the following features not available with the the StagePackageAsync overloads:

  • You can use the ExternalLocationURI property of the options parameter to specify the URI of an external disk location outside of the MSIX package where the package manifest can reference application content.

  • You can use the AllowUnsigned property of the options parameter to allow activation information from an executable in an unsigned package.

Applies to

See also