Hello,
Welcome to Microsoft Q&A!
when trying to open the application through the compiled exe file, nothing happens
This behavior is by design. For packaged WinUI3 application, it is not allowed to just launch the app from the exe file.
If you want to make a feature that the app could be launched from the exe file, you will need to create an unpackaged WinUI3 app. What you need to do is modify the project file of the packaged WinUI3 app. Then add the following line to the PropertyGroup part.
<PropertyGroup>
...
<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
...
</PropertyGroup>
After adding this, you will see the unpackage mode of the app like this
After building and running the app, now you could find the exe file of your app in the debug folder and directly run it.
More details about creating a unpackaged app, please check: Unpackaged: Create a new project for an unpackaged C# or C++ WinUI 3 desktop app and Windows App SDK deployment guide for self-contained apps
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.