Using Add-AppDevPackage.ps1 causes installation to fail due to duplicate Microsoft.Services.Store.Engagement package

Laza121 1 Reputation point
2021-05-06T21:07:58.413+00:00

There's a question similar to this here - https://social.msdn.microsoft.com/Forums/windows/en-US/36d80351-4807-4678-80a8-6a5da0f108ee/uwp-can-not-install-app-package-because-of-microsoftservicesstoreengagement-package?forum=dcefi

However, we need to install our app using Add-AppDevPackage.ps1 as part of our integration tests. The issue seems to be that "Microsoft.Services.Store.Engagement package" is already installed on the system and is being used by some other app. When I try executing this command to remove the existing packages -

Get-AppxPackage Microsoft.Services.Store.Engagement -AllUsers | Remove-AppxPackage

I get this message -

Windows cannot remove framework Microsoft.Services.Store.Engagement_10.0.19011.0_x86__8wekyb3d8bbwe because package(s)
DolbyLaboratories.DolbyAccess SAMSUNGELECTRONICSCO.LTD.1412377A9806A currently depends on the framework.

How can I continue to use Add-AppDevPackage.ps1 and install our app?

Universal Windows Platform (UWP)
{count} votes