Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to publish a WinUI3 project as an exe file?

I have created a WinUI 3 project and finished coding. I want to publish my app as an exe file(It is not necessary to have only one file, there can be many library files). I have searched on the Internet and I found one way. I tried to make the project unpackaged and I added

<WindowsPackageType>None</WindowsPackageType>
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>

to csproj file.

It stands to reason that it should be useful. But in fact, it reported an error——"You must deploy before you can debug"(Probably written like this), But I’ve opened the deployment.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

How can I resolve this error, or is there another way to solve my problem?

Any suggestions are greatly appreciated.

>Solution :

Your app should run by clicking the *.exe file. But to debug your app, you need to launch it as an Unpackaged app. Check image in the docs.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading