Hi, so the problem is the following: We found a way to solve the problem: using the getFreeEntitlement() from appinstallmanager. But now, when we try to use the method StartProductInstallAsync(productid) it don’t work in release, only when debugging through visual studio. When we run the method from an msix, we get an out of index error. ( Just to remember, the methods are running through a service, not from an application)
How to implement the download of free DLC without using UI thread
Hi, In a store app, is it possible to implemente do download of DLC without the need of the UI thread? I ve tried with storecontext but seems not possible. Also, is it possible to start the download of free DLC without the action of purchasing it? In my tests, I seem to be unable to download the DlC using the DownloadAndInstallStorePaxkagesAsynx() if I don’t “buy” it before, using the RequestPurchaseAsync()
Windows development | Internet Information Services
Developer technologies | Universal Windows Platform (UWP)
Windows for business | Windows Client for IT Pros | User experience | Other
2 answers
Sort by: Most helpful
-
-
Harry Vo (WICLOUD CORPORATION) 1,725 Reputation points Microsoft External Staff
2025-09-01T03:42:43.6533333+00:00 Hi @Rhuan Inocêncio , thank you for reaching out on Microsoft Q&A!
is it possible to implemente do download of DLC without the need of the UI thread?
Most methods in
StoreContext
class are UI‑thread only and expect an owner window (desktop apps must callInitializeWithWindow
). They’re designed to present Store UI and user consent. Running them from a background service (no UI) is unsupported.Also, is it possible to start the download of free DLC without the action of purchasing it?
No. Even free add‑ons require a license (entitlement) first; the supported path is to “purchase” (at $0) via
RequestPurchaseAsync
and then install.when we try to use the method StartProductInstallAsync(productid) it don’t work in release.
Those calls live on
Windows.ApplicationModel.Store.Preview.InstallControl.AppInstallManager
. That surface is restricted/private; documentation and repo notes indicate access is gated, and parts of the reference even require authorization to view. It may appear to work under the debugger but fails in production MSIX because the app lacks the required capability and/or is running from a service. The “index out of range” symptom commonly happens whenStartProductInstallAsync
returns no items (request rejected), but the code still indexes the result.
Here are some recommend workaround:
- Foreground UI flow (recommended for most apps): From your packaged foreground app, call
RequestPurchaseAsync(addOnStoreId)
to acquire the free license, thenRequestDownloadAndInstallStorePackagesAsync([...])
to install. Both must run on the UI thread (and desktop apps shouldInitializeWithWindow
). Avoid invoking from a Windows service. - Silent installs: Only if Microsoft grants your account the restricted capability for Store package management, or you receive Partner Center permission for programmatic optional‑package installs.
I hope this helps you get things back on track quickly! If my suggestions can solve your issue, feel free to interact with the system accordingly!
Thank you!
- Foreground UI flow (recommended for most apps): From your packaged foreground app, call