WinUI2 : How to package and deploy the WinUI2 app as a single exe

Harshithraj1871 1,496 Reputation points
2023-05-09T08:49:55.5+00:00

Hi,

I am working on WinUI2 application and was exploring on its packaging and deployment.

As WinUI2 application use MSIX and .appx app packages for deployment and installation, can we package a WinUI2 application as a single .exe file which can be shared with other system where we don't have to install anything extra as a runtime requirement?

Thank you

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 14,751 Reputation points Microsoft Vendor
    2023-05-10T02:53:52.2633333+00:00

    Hello,

    Welcome to Microsoft Q&A!

    If you are using a UWP project, it cannot be packaged into a single .exe file. UWP supports the following three types of packag. There is no content about UWP packaging into exe in the official document.

    UWP Types of app packages

    • App Package (.msix or .appx)
    • App Bundle (.msixbundle or .appxbundle)
    • App Package Upload File (.msixupload or .appxupload) - for Store Submission only

    If it is a Desktop app(Windows Forms, WPF, Win32 etc.), you can try to package it into an exe file.

    Thank you


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful