1

I have a UWP application. I can run it inside of Visual Studio by using the Run button. I also know how to create an App Package and distributed it via App Center.

What I can't figure out how to do is build an EXE file that I can run on my own computer without launching Visual Studio (or copy to another computer). I found the EXE in the project folder under bin/x64/Debug (or bin/x64/Release), but it won't run. In fact it does nothing when I double-click on it.

What am I doing wrong?

Flarosa
  • 1,287
  • 1
  • 13
  • 27
  • It is by design. – aybe Nov 20 '19 at 22:28
  • 1
    Does this answer your question? [make .exe file out of Visual Studio uwp .appx file](https://stackoverflow.com/questions/38056317/make-exe-file-out-of-visual-studio-uwp-appx-file) – aybe Nov 20 '19 at 22:36
  • Check this answer: https://stackoverflow.com/a/42364451/4095782 – Dark Templar Nov 22 '19 at 05:42
  • Does this answer your question? [Launch exe file generated by Visual Studio 2015](https://stackoverflow.com/questions/32689944/launch-exe-file-generated-by-visual-studio-2015) – Razor Dec 28 '19 at 12:34

2 Answers2

1

The easiest way I have found to get apps installed on computers for non-technical users is to give them the output of that Create App Packages submenu, which includes a ps1 script and certificate file. If you give it to them as a zip make sure they unzip the whole folder first, and run the ps1 script from the unzipped folder. If Developer Mode is not enabled on their computer, the settings dialog to enable it will open automatically, and they just have to flip the switch. Otherwise, they are just pressing Y or A in the PowerShell window to continue through the installation process.

It's not too bad, the whole thing takes about 30 seconds if you breeze through it, but I believe you need admin rights on the computer you're installing on, there's a UAC prompt at some point.

jspinella
  • 2,013
  • 3
  • 25
  • 39
0

I found the EXE in the project folder under bin/x64/Debug (or bin/x64/Release)

The exe file is the uwp executive core, but it could not run directly, because it has some dependencies need to be packed together, so we need use Visual Studio to create package for your app. And this document contains detailed steps you could refer.

After getting the installation package, we need the side-load, and please note:

If you are not publishing your app and simply want to sideload an app package, you first need to trust the package. To trust the package, the certificate must be installed on the user's device.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36
  • The majority of the content in your answer is in the off-site links, which means that if those links disappear your answer has no value. (And before you say *they go to MS, and won't disappear* I have dozens of links to MS that were previously on MSDN that broke when MS moved to docs instead, so where they lead isn't really relevant. They're off-site.) – Ken White Nov 21 '19 at 02:08
  • Hi @KenWhite, Above links are Microsoft official document, they will not expire in the short term, and Microsoft official document has feature that will add new document when the original document expire. – Nico Zhu Nov 21 '19 at 02:18
  • And if you have some problem about disappear document, please let me know, I will find the new link for you. – Nico Zhu Nov 21 '19 at 02:20
  • Yes, and like I said before: All of the MS *official documentation* that was on MSDN died when MS moved to docs instead. I have dozens (if not hundreds) of invalid MSDN links to *official Microsoft documentation* that disappeared when they redesigned the site. So the location is irrelevant - the *official documentation* has disappeared before and invalidated all of the links to them. Are you going to go through the millions of questions here and update all of the invalid links in them to move them from MSDN to docs? – Ken White Nov 21 '19 at 02:20
  • Note: both links lead to the same page. Looks like the second link's id # is not working. – TheForgot3n1 Jun 29 '23 at 14:50