# MSIX Packaging and Microsoft Store Deployment

> Create an MSIX package of a WPF app with TX Text Control: packaging project, certificate signing, sideload install, Microsoft Store option and AppContainer.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Deployment Guide > MSIX Packaging and Microsoft Store Deployment
- **1385 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/msix/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/msix/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/msix/llms-full.txt

---

Packaged as MSIX, a WPF application with TX Text Control can be sideloaded onto machines in your organization or submitted to the Microsoft Store. Visual Studio builds the package from a Windows Application Packaging Project that references your WPF project, and the project's reference to the NuGet package `TXTextControl.TextControl.WPF.SDK` comes along with it. What follows sets up the packaging project, creates and signs a package, installs it for a test and shows how to run the application in an AppContainer.

### Prerequisites

- A WPF application for .NET 8 or higher with `TXTextControl.TextControl.WPF.SDK`; see [Create Your First WPF Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-editor/first-application/llms-full.txt).
- The Visual Studio component **MSIX Packaging Tools**: open the Visual Studio Installer, choose **Modify**, and check **MSIX Packaging Tools** among the optional components of the workload **.NET desktop development**.

    ![The Visual Studio Installer modifying Visual Studio 2022, with the workload .NET desktop development selected and the optional component MSIX Packaging Tools checked in the installation details.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/vs-installer-msix-tools.0c162b36.webp)

### Create the Packaging Project

1. In **Solution Explorer**, right-click the solution, and choose **Add** > **New Project**.
2. Find the template **Windows Application Packaging Project**, and click **Next**.
3. Name the project, and click **Create**.
4. Choose the target version and the minimum version of Windows for the package, and click **OK**. Text Control's walkthrough uses Windows 10, version 1809 as the minimum:

    ![The New Windows Project dialog, which asks for the target version, here Windows 10, version 2004, and the minimum version, here Windows 10, version 1809.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/msix-target-minimum-version.0f4d6bc2.webp)
5. Right-click the packaging project, choose **Add** > **Project Reference**, check the WPF project, and click **OK**.
6. Right-click the packaging project again, and choose **Set as Startup Project**.

The WPF project now appears under **Dependencies** > **Applications** of the packaging project, together with its package reference.

### Build and Sign the Package

1. With the packaging project selected, choose **Project** > **Publish** > **Create App Packages**.
2. Select the distribution method. **Sideloading** creates a package you install yourself; the Microsoft Store is the alternative for public distribution. For a first test, choose **Sideloading**, clear **Enable automatic updates**, and click **Next**:

    ![The page Select distribution method of the Create App Packages dialog, with Sideloading selected and Enable automatic updates not checked.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/msix-distribution-method.b15fd59a.webp)
3. On the signing page, select **Yes, select a certificate**, and pick the certificate for the package. **Create** makes a self-signed certificate if you have none. Continue with **Next**.
4. Check the architectures to build, for example **x64**, and click **Create**:

    ![The page Select and configure packages of the Create App Packages dialog, where the x64 architecture is checked with the solution configuration Debug (x64).](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/msix-select-packages.da786ac1.webp)

The architecture corresponds to a platform of your solution. [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/x86-x64-anycpu/llms-full.txt) explains what the platform means for the native libraries of TX Text Control.

### Sideload the Package for a Test

Windows installs a sideloaded package only if it trusts the certificate the package was signed with.

1. Open the output folder of the package, right-click the *.cer* file, and choose **Install Certificate**.
2. Choose **Local Machine**, and click **Next**.
3. Choose **Place all certificates in the following store**, browse to **Trusted Root Certification Authorities**, and finish the wizard with **Next** and **Finish**.

    ![The Certificate Store page of the Certificate Import Wizard with Place all certificates in the following store selected and the store Trusted Root Certification Authorities.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/certificate-trusted-root.7a3d54fc.webp)
4. Double-click the *.msixbundle* file, and click **Install**.

Windows installs the application and starts it.

### Run in an AppContainer

With .NET, Windows Forms and WPF applications can run in an AppContainer: an isolation in which the application reaches resources such as the camera, the microphone, the location or user data only if its package declares them.

1. In **Solution Explorer**, expand **Dependencies** > **Applications** of the packaging project, and select the WPF application.
2. In the **Properties** window, change **Trust Level** to **Partial Trust**. The setting is the same for a Windows Forms and a WPF application; the picture shows the project reference of a Windows Forms project:

    ![The Properties window of a project reference with the Trust Level set to Partial Trust.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/msix-packaging-trust-level.4aad2a52.webp)
3. In the packaging project, open *Package.appxmanifest*, switch to **Capabilities**, and check what the application has to reach:

    ![The Capabilities page of Package.appxmanifest with a list of capabilities, of which Internet (Client) and Microphone are checked.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-wpf/msix-capabilities.1a03b0fc.webp)

The packaged application then has access to the declared resources and no others. Text Control's article [Secure and Deploy .NET Windows Forms Apps with MSIX AppContainer Apps](https://www.textcontrol.com/blog/2024/01/15/secure-and-deploy-net-windows-forms-apps-with-msix-appcontainer-apps/) demonstrates it with a Windows Forms application; the settings are those of the packaging project.

### Learn More

The blog article [Deploying Windows Forms and WPF to Windows Store using MSIX](https://www.textcontrol.com/blog/2022/09/14/deploying-windows-forms-and-wpf-to-windows-store-using-msix/) walks through packaging and sideloading with screenshots, written for version 31.0 and .NET 6.

### Next Steps

- [Publishing .NET Applications](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/dotnet/llms-full.txt): deploy the application as a publish folder instead.
- [Redistribution Overview](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/redistribution/llms-full.txt): what any deployment of TX Text Control contains.
- [CI/CD](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/ci-cd/llms-full.txt): build the WPF application in a pipeline.

---

## Nearby

- **Previous:** [Application Licensing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/licensing/llms-full.txt)
- **Next:** [CI/CD](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/deployment/ci-cd/llms-full.txt)
