MSDN Community

Universal Windows Platform (UWP) Deployment

This topic covers the various methods and considerations for deploying Universal Windows Platform (UWP) applications to end-users. From the Microsoft Store to sideloading and enterprise distribution, understanding deployment options is crucial for reaching your target audience effectively.

1. Microsoft Store Deployment

The most common and recommended method for distributing UWP apps is through the Microsoft Store. This provides a centralized, secure, and discoverable platform for users to find and install your applications.

  • Benefits: Automatic updates, broad reach, discovery features, trusted distribution channel.
  • Process: Requires packaging your app into an App package (`.msix` or `.appx`), creating a developer account, and submitting your app through the Partner Center for certification and publishing.
  • Considerations: Adherence to Store policies and guidelines, performance requirements, and timely updates.

Packaging Your App

You can package your UWP application using Visual Studio. Navigate to your project, right-click, and select "Publish" > "Create App Package...". This wizard will guide you through creating the necessary `.msix` or `.appx` files.


// Example: Creating an App Package in Visual Studio
// Right-click project -> Publish -> Create App Package...
// Follow the wizard steps, selecting architecture, configuration, and package format.
                

2. Sideloading

Sideloading allows you to install UWP apps directly onto a device without going through the Microsoft Store. This is often used for testing, development, or private distribution.

  • Methods: PowerShell commands, command-line tools like `Add-AppxPackage`, or provisioning packages.
  • Requirements: Developer mode must be enabled on the target device, or you need a provisioning package that trusts your app.
  • Use Cases: Internal testing, custom enterprise solutions, pre-installed apps on devices.

Using PowerShell

To install an app package using PowerShell, you can use the Add-AppxPackage cmdlet.


# Example: Installing an app package via PowerShell
Add-AppxPackage -Path "C:\Path\To\YourApp.msix"
                

For installing with dependencies:


Add-AppxPackage -Path "C:\Path\To\YourApp.msix" -DependencyPath "C:\Path\To\Dependencies"
                
Note: Ensure that the necessary certificate is trusted on the target machine if you are not using a provisioning package.

3. Enterprise Deployment

For organizations, UWP apps can be deployed using enterprise management tools.

  • Tools: Microsoft Intune, System Center Configuration Manager (SCCM), or Windows Server Active Directory Group Policy.
  • Methods: These tools often leverage sideloading capabilities or custom provisioning to distribute apps across an organization's fleet of devices.
  • Advantages: Centralized control, management of app lifecycles, and simplified distribution for internal use.

4. Provisioning Packages

Provisioning packages (`.ppkg` files) are used to configure devices and can include UWP apps. These are particularly useful for OEM scenarios or when setting up new devices.

  • Creation: Created using the Windows Configuration Designer tool.
  • Inclusion: Packages can include one or more App Packages and their dependencies, along with other device settings.

Choosing the Right Deployment Method

The best deployment method depends on your application's audience, distribution goals, and management requirements.

  • For public distribution and ease of updates: Microsoft Store.
  • For development, testing, or private distribution: Sideloading.
  • For corporate environments: Enterprise Deployment Tools.
  • For device setup and OEM scenarios: Provisioning Packages.