MSIX Packaging Extension
The MSIX Packaging Extension is an Azure DevOps extension which helps build, package and sign Windows apps using the MSIX package format.
CI/CD workflows have become an integral part of the development process to improve efficiency and quality while reducing cost and time to market. Microsoft's CI/CD solution Azure DevOps Pipelines is widely adopted and popular, but the current process of integrating build and deployment workflows for apps that need to be packaged as MSIX into Azure Pipelines is tedious, specifically for people that are not Azure Pipelines or MSIX experts. This Azure DevOps extension offers a straightforward and intuitive solution making it easier to automate build and deployment process for apps being packaged as MSIX, and for apps with existing CI/CD workflows to move to MSIX without disrupting their build and deployment mechanisms.
The MSIX Packaging Extension contains the following tasks that you can use to custom build your pipeline according to your requirements:
- MSIX build and package - to build and package Windows apps using the MSIX package format
- MSIX package signing - to sign MSIX packages using a trusted certificate
- App installer file for MSIX - to create or update a .appinstaller file for MSIX apps
- Create package for MSIX app attach - to create a VHDX package for MSIX app attach
Install the extension
Browse the Azure DevOps Marketplace and look for the extension name MSIX Packaging Extension.
Create a Pipeline
Create a new pipeline for your Azure DevOps project.
Select the option to Use the classic editor to create a pipeline without YAML.
Select your version control system and provide your repository and default branch details.
When asked to Select a template, click start with an Empty job.
Change your Agent Specification selection to windows-2019 since the MSIX extension runs only on a Windows agent.
You should see Agent job 1 by default in your pipeline. Click on the plus symbol to Add a task to Agent job 1.
Search for MSIX in the Add tasks search bar and you should see the tasks mentioned before in the MSIX Packaging Extension. You can custom build your pipeline by adding the tasks you need according to your requirements. But we will demonstrate how to configure all four tasks on this page.
MSIX build and package
Note: If you are trying to build a packaged app using this task, you will need to include the Windows Application Packaging Project, because the task needs the Package.appxmanifest file. The task will not add it automatically for you.
Here's an example that shows how to configure the build and package task in the yaml file:
steps: - task: MSIX.msix-ci-automation-task-dev.msix-packaging.MsixPackaging@1 displayName: 'MSIX build and package' inputs: outputPath: '$(Build.ArtifactStagingDirectory)\MyApp.msix' solution: MyUWPApp.sln buildPlatform: x64 updateAppVersion: true manifestFile: MyUWPApp/Package.appxmanifest appVersion: 220.127.116.11 appPackageDistributionMode: SideloadOnly msbuildArchitecture: x64
MSIX package signing
Here's an example that shows how to configure the package signing task in the yaml file:
steps: - task: MSIX.msix-ci-automation-task-dev.msix-signing.MsixSigning@1 displayName: 'Sign MSIX package' inputs: certificateType: base64 encodedCertificate: '$(kvtestcert)'
App installer file for MSIX
Here's an example that shows how to configure the AppInstaller file task in the yaml file:
steps: - task: MSIX.msix-ci-automation-task-dev.app-installer-file.AppInstallerFile@1 displayName: 'Create App Installer file' inputs: package: '$(Build.ArtifactStagingDirectory)\MyApp.msix' outputPath: '$(Build.ArtifactStagingDirectory)\MyApp.appinstaller' uri: 'https://myuwpapp-demo.azurewebsites.net/MyApp.appinstaller' mainItemUri: 'https://myuwpapp-demo.azurewebsites.net/MyApp.msix' showPromptWhenUpdating: true updateBlocksActivation: true
Create package for MSIX app attach
Here's an example that shows how to configure the task to create a VHDX file for app attach in the yaml file:
steps: - task: MSIX.msix-ci-automation-task-dev.msix-app-attach.MsixAppAttach@1 displayName: 'Create package for MSIX app attach' inputs: package: '$(Build.ArtifactStagingDirectory)\MyApp.msix' vhdxOutputPath: '$(Build.ArtifactStagingDirectory)\MyApp.vhdx'
Ways to provide Feedback
We would love to hear your feedback on the MSIX Packaging Extension. Reach out to us via the following channels: