UWP app packaging and sideloading

(Guest) Hinrich Rahlfs

31/01/2020

This is a “Hello World!” tutorial that explains how to package a UWP app and install it on another device.

With UWP (Universal Windows Platform), Windows has provided APIs for many functionalities that are essential for wearable devices. For me, Bluetooth is the most important of these.
In principle, these functionalities are also available in WPF applications, but with many Exceptions. Therefore, I think it makes sense to implement GUI applications with functionalities like Bluetooth in the form of UWP apps.

Even though the transition was a bit bumpy after extensive experience with WPF applications, I was able to get used to the basic idea of UWP apps. One stumbling block was creating an .exe for my UWP app. This isn't possible because the basic concept of apps is different. Apps are intended to be distributed via the Microsoft Store.
However, for development, it is necessary to create an executable file that can be run independently of Visual Studio without making it available in the Microsoft Store. To do this, the app must be packaged and then installed. Packaging and sideloading an app are here However, there is also a lot more to be shown and I think that a short "Hello World!" is very helpful for packing and sideloading. I am building on the “Hello World!” from Windows. After completing the steps described there, this article begins, explaining packaging and sideloading. Recipients of the app only need to complete steps 5 and 6.

1. Create the app

Proceed as described in the “Hello World!” Article described.

2. Create a certificate

For your app to be accepted as trusted, a certificate must be used. In our case, creating our own certificate is sufficient.
To do this, open PowerShell (Windows + R and then enter “powershell”) and execute the following command, where red written parts should be adapted to your requirements:

New-SelfSignedCertificate -Type Custom -Subject "CN=Hello World, O=MedTech Engineer, C=DE"-KeyUsage DigitalSignature -FriendlyName"Hinrich Rahlfs" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
Erstellen des Zertifikats in der Powershell
Creating the certificate in PowerShell

For further information I recommend this link.

3. Customize the app manifest

Now Visual Studio needs to be informed about which certificate should be used.
To do this, the app manifest must be opened in Solution Explorer.
Select the menu item “Packaging” here.
Visuelle Oberfläche von Visual Studio zum Finden des Verpacken Menüs
Then click "Select Certificate..." and then "Select from Store...". In the dialog that opens, you can select the certificate you just created.
Dialog zum Auswählen des Zertifikats

4. Packaging the app

Now everything is ready to package the app. To do this, right-click on the project in the Solution Explorer and select "Publish" (or "Store" in older versions) ⇾ "Create App Packages..."

Then click through the dialog that opens. In the last dialog, select "Release."

Once the app has been packaged, Visual Studio displays the location, which is "...\HelloWorld\HelloWorld\AppPackages\HelloWorld_1.0.0.0_Test"
The app is now fully packaged and can be sideloaded onto another device.

5. Trust the certificate

To sideload the app on another computer, transfer the folder created during packaging to the device on which the app is to be installed.
Then sideloading of apps must be allowed on this device. To do this, activate the developer mode as follows: here described.
Now you need to trust the app. To do this, run the certificate file "HelloWorld_1.0.0.0_x86_x64.cer" located in the "HelloWorld_1.0.0.0_Test" folder.
Click "Install Certificate...". Select "Local Computer." Then select "Trusted Root Certification Authorities" as shown in the figure.

When you click “next”, the certificate will be installed and the app can be installed.

6. Installing the app

Now all that's left to do is install the app. To do this, run the file "HelloWorld_1.0.0.0_x86_x64.msixbundle" and follow the dialog.

The app is now installed and can run independently of Visual Studio.


Hinrich Rahlfs worked as a student engineer at MEDtech. His responsibilities included programming graphical user interfaces and developing an intuitive filter design tool.


More articles

  • 09/09/2025
  • General, Software

In previous blog posts, I have introduced two essential components of a simple and universally applicable software architecture: events with dispatchers, listeners, and data pools. These already allow for many simple use cases ...

Read more
  • 12/11/2024
  • General, Software, Testing, Tools

In safety-critical software projects, software quality is paramount. Especially for Class C software, which must be certified according to strict standards such as IEC 62304 (medical technology), it is essential that ...

Read more
  • 08/08/2024
  • General, Electrical Stimulation, Software, Testing

Nowadays, apps in the healthcare sector are very important. Apps that can read and process data from medical sensors are particularly useful. Flutter is an open-source framework from Google that is excellent for ...

Read more
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.