Deploying Windows App SDK Applications

This document provides guidance on how to deploy applications built with the Windows App SDK. The Windows App SDK offers flexible deployment options, allowing you to deliver your applications to users through various channels.

Deployment Options

The Windows App SDK supports two primary deployment models:

1. Framework-Dependent Deployment (Recommended)

In this model, your application relies on a runtime provided by the Windows App SDK. This runtime can be pre-installed on the user's machine or installed alongside your application.

Advantages:

Deployment Methods:

2. Self-Contained Deployment

With self-contained deployment, your application package includes the specific version of the Windows App SDK runtime it requires. This ensures your application runs with the exact version it was built against, regardless of what's installed on the user's system.

Advantages:

Considerations:

Deployment Methods:

Typically deployed as an MSIX package or as an executable with all necessary runtime files bundled.

Packaging Your Application

The Windows App SDK integrates seamlessly with modern packaging technologies, primarily MSIX.

Using MSIX Packaging

MSIX is the recommended packaging format for Windows applications. It provides a robust, reliable, and efficient way to distribute and install applications.

Key Benefits of MSIX:

Steps for MSIX Packaging:

  1. Configure your project: Ensure your project is set up for MSIX packaging in Visual Studio.
  2. Create an MSIX package: Use Visual Studio's "Publish" functionality or the msbuild -p:GenerateAppxPackageOnBuild=true command.
  3. Include Windows App SDK runtime (if self-contained): If you're using self-contained deployment, ensure the runtime is properly included in your package manifest.

Tip: For framework-dependent deployments, consider using the Dynamic Dependency Lifetime Manager (DDLM) to manage the lifecycle of the Windows App SDK runtime.

Deployment Scenarios

Scenario 1: Desktop Bridge (for existing Win32 apps)

If you have an existing Win32 application, you can modernize it by packaging it as an MSIX using the Desktop Bridge. This allows you to leverage the benefits of MSIX without a full rewrite.

Scenario 2: New UWP-style apps with WinUI 3

Applications built with WinUI 3 and the Windows App SDK can be deployed as framework-dependent or self-contained MSIX packages. This is the standard approach for new Windows applications.

Note: When deploying framework-dependent applications, the target machine must have a compatible version of the Windows App SDK runtime installed. You can ensure this through the Microsoft Store, Windows updates, or by bundling the runtime installer.

Runtime Deployment

For framework-dependent deployments, the Windows App SDK runtime needs to be available on the target machine. Here are common ways to ensure this:

Command-Line Tools

Several command-line tools can assist with the deployment process:

Best Practices

Next Steps

Explore the following resources to further refine your deployment strategy: