# MSIX Packaging and Microsoft Store Deployment

> Package a Windows Forms app with TX Text Control as MSIX: Windows Application Packaging Project, signing, sideloading, Microsoft Store and AppContainer trust.

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

---

MSIX is the Windows packaging format for apps that are sideloaded or published to the Microsoft Store. A .NET Windows Forms application with TX Text Control is packaged with a Windows Application Packaging Project in Visual Studio, which takes your application project and its NuGet package references and builds an installable package. The steps below create the package, install it for a test and, optionally, run the application in an AppContainer with limited access to the system.

### Prerequisites

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

    ![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-winforms/vs-installer-msix-tools.0c162b36.webp)

### Add the Packaging Project

1. Right-click the solution in **Solution Explorer**, and choose **Add** > **New Project**.
2. Select the template **Windows Application Packaging Project**, and click **Next**.
3. Enter a project name, and click **Create**.
4. Select the target and minimum Windows versions of the package, and click **OK**. Text Control's article selects Windows 10, version 1809 as the minimum:

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

Under **Dependencies** > **Applications** of the packaging project, **Solution Explorer** now shows your application with its reference to `TXTextControl.TextControl.WinForms.SDK`. The files of TX Text Control come into the package through this reference.

### Create the App Package

1. Select the packaging project, and choose **Project** > **Publish** > **Create App Packages**.
2. Choose how you distribute the application: **Sideloading** for installation outside the Store, or the Microsoft Store. For a test, select **Sideloading**, clear **Enable automatic updates**, and click **Next**:

    ![The Create App Packages dialog on the page Select distribution method, with Sideloading selected and Enable automatic updates cleared.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/msix-distribution-method.b15fd59a.webp)
3. Select **Yes, select a certificate**, and choose a certificate to sign the package with. Without one, click **Create** to create a self-signed certificate. Click **Next**.
4. Select the architectures to create packages for, such as **x64**, and click **Create**:

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

Text Control's article creates an x64 package. [x86, x64, and AnyCPU](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/deployment/x86-x64-anycpu/llms-full.txt) explains what the platform means for the native libraries of TX Text Control.

### Install a Sideloaded Package

A package signed with a self-signed certificate installs only on a machine that trusts the certificate.

1. In the output folder of the package, right-click the certificate file with the extension *.cer*, and choose **Install Certificate**.
2. Select **Local Machine**, and click **Next**.
3. Select **Place all certificates in the following store**, browse for **Trusted Root Certification Authorities**, and click **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-winforms/certificate-trusted-root.7a3d54fc.webp)
4. Double-click the *.msixbundle* file, and click **Install**.

The application starts after the installation.

### Run the Application in an AppContainer

A packaged .NET application can run in an AppContainer, an isolated environment in which it can reach system resources such as the camera, the microphone, the location or user data only when the package requests them.

1. In **Solution Explorer**, expand **Dependencies** > **Applications** of the packaging project, and select your application.
2. In the **Properties** window, set **Trust Level** to **Partial Trust**:

    ![The Properties window of the project reference with the Trust Level set to Partial Trust.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/msix-packaging-trust-level.4aad2a52.webp)
3. Open *Package.appxmanifest* of the packaging project, go to the **Capabilities** tab, and check each resource the application needs:

    ![The Capabilities tab of Package.appxmanifest in Visual Studio, with Internet (Client) and Microphone checked.](https://docs.textcontrol.com/assets/img/tx-text-control-dotnet-winforms/msix-capabilities.7154a8ca.webp)

When the application runs with partial trust, it reaches only the resources checked there. If it can't open files or devices it reached before packaging, see [An MSIX Package Runs With Limited Access](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/troubleshooting/deployment/#an-msix-package-runs-with-limited-access).

### 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/) packages and sideloads a Windows Forms application with a ribbon, written for version 31.0 and .NET 6.
- The blog 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/) sets up the AppContainer, written for version 32.0 and .NET 8.

### Next Steps

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

---

## Nearby

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