Packaging UWP Application with more than 25GB Data

Problem Statement

We were working on a Digital Signage application, where we have used the Universal Windows Platform (UWP). The application heavily depends on the data files, i.e., the quality images and videos and their effective navigation is key in this application. The total size of the data files is very huge (more than 25 GB). We can not package this app as there is a restriction on the Package Size that it can be 25 GB maximum per bundle.

In this article, I will be sharing how we shipped this application which had huge data.

Prerequisites

  • Familiarity with creating Universal Windows Platform (UWP) applications
  • Familiarity with Application Design

Load data through the external device

We solved this particular problem by separating application package from its data. By doing this, we reduced the application package size to be as small as possible. Data is shipped separately via an external device, for example, USB. We added the required logic to make the application smart by detecting external drive when inserted and copied the same data into the local machine.

Steps:

  • Keep the Application Package as light as possible and separate this from data files
  • Data files need to be shipped separately in the form of  USB
  • As and when the Application is installed and started for the first time, it checks for the data folder. As it is running for the first time, it will not find data. Depending on the configuration, the installer prompts the user to insert a drive consisting of the data files.

Code:

Please find the code logic for detecting external storage and copying data into the AppData folder as mentioned below. At the start of the Application, we’ll verify to check whether data is available locally or not. If not, we try reading it from external storage (App.xaml.cs).

Summary

This article explained how to package Universal Windows Platform (UWP) Application whose data size is > 25GB. I hope this article guides you in taking an informed decision.

At WalkingTree, we are excited about UWP’s ability to enable developers to build the app which runs on windows-based devices of different sizes. We continue to take advantage of this and love to help you as well.

You can find the complete source code at this repository.

References

  • For information on App Package Requirements – Refer to this link.

Leave a comment

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.