Add/Update a non-Store published Optional Package from code

Copper Contributor

Hi,

I have a question regarding the add/update of a non-Store published Optional Package from code.
In the documenation, AddPackageAsync API, seems to be the way to add/update a package from code.
My question is - how can I add/update an Optional Package from code ? From documentation, AddPackageAsync method seems to work only with main packages.

 

Thanks !

Victor

2 Replies
Microsoft Verified Best Answer

Hi @Victor Vica ,

 

AddPackageAsync should work to install an optional package as long as the main package is already installed on the device.

 

If you are seeing an error, please share the error message for us to review.

 

Thanks!
James

Hi, @James Pike 

 

Thanks for your reply. I will try it as you adviced and keep you posted.

 

Victor