Closed HppZ closed 2 years ago
You could use DeferRegistrationWhenPackagesAreInUse. It is a Boolean value, TRUE indicates that registration of the main package or dependency packages will be delayed until the next time the application is activated if the packages are currently in use; otherwise, FALSE. We will update the doc to reflect this.
References: AddPackageOptions Class https://docs.microsoft.com/en-us/uwp/api/windows.management.deployment.addpackageoptions?view=winrt-22000
AddPackageOptions.DeferRegistrationWhenPackagesAreInUse Property https://docs.microsoft.com/en-us/uwp/api/windows.management.deployment.addpackageoptions.deferregistrationwhenpackagesareinuse?view=winrt-22000#windows-management-deployment-addpackageoptions-deferregistrationwhenpackagesareinuse
and what is the difference between AddPackage*
and UpdatePackage*
?
Either can be used for updating, we recommend you use AddPackage for install and update both. It simplifies code.
thanks
from doc:
await packagemanager.AddPackageAsync(new Uri("https://trial3.azurewebsites.net/HRApp/HRApp.msix"), null, AddPackageOptions.ForceApplicationShutdown
same for
UpdatePackageAsync
.but according to my test, the update is applied immediately after AddPackageAsync, and the app is killed by Windows. why?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.