Skip the post and download the script here
One of the few step backwards I have found when working with UWP projects is the process of deploying application packages to devices running Windows 10 Mobile.
While previously we had access to the handy Windows Phone Application Deployment 8.1 tool, which was very basic but at least had a graphical user interface, now the only way to deploy an app package without using Visual Studio it’s through the Windows 10 Application Deployment (WinAppDeployCmd) tool.
The new tool packs more features than its 8.1 counterpart, but the main drawback is that it’s entirely command line based – and sometimes, when redistributing application packages to users or clients that have limited IT knowledge, it can be a pain to guide them through the necessary steps for getting the app installed on their phones. And to make matters worse, when building application packages from Visual Studio, the
Add-AppDevPackage.ps1 autogenerated script is only useful when deploying to devices using full Windows 10, not Windows 10 Mobile!
So, to make the distribution and deployment/sideload of Windows 10 Mobile packages, I have created a very simple script based on
Add-W10MAppPackage. It’s a really simple PowerShell script that you can drop on the same folder that your ARM package is sitting on, run it, and have the app deployed on your device in a matter of seconds.
To use it, download it from the link at the beginning of the post (or you can check it in its GitHub repository, in case you want to contribute!) and drop it in a folder that contains a .appx or .appxbundle package, compiled in ARM for Windows 10 Mobile. Right click on it and select Run with PowerShell, and it will automatically search for the WinAppDeployCmd tool and call it with the default parameters to deploy the application to the phone currently connected to the computer. It will output any error messages if something goes wrong.
It also supports the following configuration parameters:
- -Force [true/false]: if set to true, skips any input needed from the user.
- -WindowsSdkPath “path/to/tool”: path to the WinAppDeployCmd tool in case it’s not installed in the default location.
- -DeviceIp “192.168.0.1”: by default the script looks for devices with IP 127.0.0.1 (those connected by USB to the computer); changing the IP address allows deployment through WiFi/network.
If you find any issues while using it, feel free to comment on this post or report a new issue on the GitHub repository!
One thought to “A PowerShell script for sideloading UWP packages to W10M devices easily”
Fantastic, you’re a lifesaver. I love Windows Mobile, but I always get the feeling M$ doesn’t care. Thanks for helping W10M great again 🙂