MicrosoftDocs / winrt-api

WinRT reference content for developing Microsoft Universal Windows Platform (UWP) apps
Creative Commons Attribution 4.0 International
231 stars 500 forks source link

PackageManager Staging calls fail with ACCESS DENIED if made from inside a container. #2436

Open TimMangan opened 11 months ago

TimMangan commented 11 months ago

The PackageManager functions to StageInPlace will all fail with an AccessDenied exception, if made by a process that is itself running in a container. The same code run unpackaged will succeed, but hey - we all want us writing modern code, right??? It took 3 weeks to figure out that this was the cause.

To be clear, this is code in a package that is trying to add a different package using AppAttach style attachment of a CIMfs package (not a package trying to update itself).

At a minimum the documentation on the following items should reflect this restriction (but it sure would be nice if the code just handled it).

StagePackageAsync(all flavors) StagePackageByUriAsync()


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.