Comment by WorldMaker
8 years ago
> I cannot distribute .APPX
You can distribute .APPX. You can't distribute an unsigned .APPX and guarantee users can use it, but you haven't been able to do that with .EXE in years either.
> I cannot run .APPX.
Double clicking an .APPX installs it.
> I cannot run .EXE.
You can include Win32 .EXEs in .APPX packages now. There's a bunch of tools to support just that scenario called the "Desktop Bridge".
> I cannot run from command shell.
The desktop bridge now supports command line apps: https://blogs.windows.com/buildingapps/2017/07/05/command-li...
Any app that supports protocol activation (URIs like xbox:// or my-custom-app://cool-action) can be called with PowerShell (`Start-Process xbox://`). Most apps don't publish activation URLs, but some common ones are discoverable.
From within a UWP app you can launch other apps and files to their associated and URLs: https://docs.microsoft.com/en-us/uwp/api/Windows.System.Laun...
The Desktop Bridge has an API to launch an .EXE from UWP, either as a background task or a foreground task. There are also APIs to transfer data between the .EXE and UWP apps.
> I have to use exclusively Visual Studio in order to run my app.
You don't have to. It's a lot easier, but it's not the only way. APPX isn't that special, it's a zip file with an XML file and your binaries and whatever else, and any IDE could put one together if it desired. I wouldn't want to hand-build .APPX packages, but that's an option if you really desire it.
> I cannot launch automated UI test.
There are automation drivers for Appium and Selenium for UWP.
> Why should I play bureaucracy games with certificates on my own machine?
You don't, Windows Developer Mode does all the security work for you for your own development/testing needs.
IF you want to let others install your app, you need a security certificate. This has been the case with .EXE and .MSIs for decades, this is not new security.
> "Launch from Layout" API
I have no idea what this is referring to.
Launch from Layout is an installation method that allows you to take loose files (an unpacked appx zip) and tell the OS 'treat this as an installed app'. You can do this with a couple WinRT APIs, Device Portal, or WinAppDeployCmd which comes with the SDK.
I own dev mode for Windows 10, and can confirm that these issues have been always solved and recently received more improvements, although the documentation may be lacking. Windows has always supported third party stores and the ability to pass around an appx.
>a couple of WinRT APIs, WinAppDeployCmd
Any hints or sample for Launch from Layout? Yes, I read the docs. This question haunts me for 4 years and I still have no answer. Please please please.
Here is a sample scenario that blocks me from doing certain development actions:
--- Steps to Reproduce --- 1. Launch VS 2017 2. Create new UWP blank app 3. Build it 4. Go to project's bin\Debug folder in File Explorer. 5. Find app's .EXE file and double-click it
--- Actual Results --- .EXE file cannot be launched. Error: "This application can only run in the context of an app container."
--- Expected Results --- .EXE file is launched. Main app window appears and it works as usual
>Double clicking an .APPX installs it.
Just checked that. Nope, this is what I get for my freshly compiled app when I click on corresponding .APPX file: "[Window Title] How do you want to open this file? [Content] Look for an app in the Store [OK]"
Any solution to this? These files should be consumable at the OS level.
>These files should be consumable at the OS level.
They are. You've broken something, I suspect.