question

NechytailoValeriiELS-0536 avatar image
0 Votes"
NechytailoValeriiELS-0536 asked NechytailoValeriiELS-0536 commented

How to use DLC in my UWP app

Hey everyone,
I want to implement DLC content to my UWP app to reduce its size, with possibility to install DLC packages from code. Looks like optional packages are what I need. But to install optional package from code I need to use StoreContext.RequestDownloadAndInstallStorePackagesAsync or PackageCatalog.AddOptionalPackageAsync(). But both methods have notes, that them not avaliable to all developer accounts. Also PackageCatalog.AddOptionalPackageAsync() have a note that it can be used only for optional packages in a related set. For publish optional packages in a related set needed special permission from Windows, and answer from Windows support: "Unfortunately, they have denied the request to use optional packages with related sets".
Is there some other way to use DLC in my app?

windows-uwp
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@NechytailoValeriiELS-0536 I’m afraid you can’t do this without using optional package. There is no other way to solve it, currently, uwp only provides optional package to download and install DLC.

0 Votes 0 ·

Can you clarify, can I use StoreContext.RequestDownloadAndInstallStorePackagesAsync to download and install optional package without code (only content)? I'm successfully submitted such package to store, but StoreContext.RequestDownloadAndInstallStorePackagesAsync finishing with error ERROR:No products found. I used StoreId for my optional package. Is there some tricks? Thank you in advance!

0 Votes 0 ·
AryaDing-MSFT avatar image AryaDing-MSFT NechytailoValeriiELS-0536 ·

@NechytailoValeriiELS-0536 Micorsoft App store takes some time (approx. 24 hours) to enable the products/add-ons to programming APIs. So please wait patiently.

0 Votes 0 ·
Show more comments

1 Answer

NechytailoValeriiELS-0536 avatar image
0 Votes"
NechytailoValeriiELS-0536 answered

After research I found that I can upload DLC (optional packages, only content, not in related set, link to description: https://docs.microsoft.com/en-us/windows/msix/package/optional-packages) to store, install them manually and use in my main app.
But if you need to install DLC from code, you need special permission from Microsoft to use optional packages, so that the Microsoft Store can associate this optional package with your app, and then you could download it through code.
With permission new field will appear in Partner centre->Product->Create new add-on menu. If you choose Durable add-on, you'll have new option "Enable package upload", where you can upload your optional packages. Add-ons have StoreIds, so, using them you can later download these packages from code with StoreContext.RequestDownloadAndInstallStorePackagesAsync Method. Also you can uninstall installed optional packages with PackageCatalog.RemoveOptionalPackagesAsync.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.