I keep hitting this problem when I try to debug my Windows 8 apps and there is a copy already installed on another user account:
DEP0700 : Registratio
There was an improvement in Windows 10 1709 to the remove-appxpackage cmdlet, adding -allusers as an option.
So, to uninstall an App for all users, this command works:
Get-AppxPackage -AllUsers [PackageFamilyName] | Remove-AppxPackage -AllUsers
Where [PackageFamilyName] is generally the GUID of your package.
Caveat / Caution: The command seems to make re-installation (re-provisioning the package using DISM) later very difficult, as it seems to treat is as if each user individually uninstalled the app. Too much to get into here...
What worked for me
1. Close VS
2. Open Services
3. Stop Appx Deployment Service
4. Open C:\ProgramData\Microsoft\Windows\AppRepository\ and delete the PackageRepository.edb file.
5. Start Appx Deployment Service
6. Start VS & Debug - worked like charm
I just used get-appxpackage -all | where name -eq "PackageName" | remove-appxpackage -AllUsers
on Win 10 v1903 after trying many other variations and it worked. I tested for the package's presence afterwards and it was gone.
Though this didn't work for me, it may just work for someone else...
Start powershell as Administrator and run:
Get-AppxPackage -all | Out-GridView -Passthru | Remove-AppXPackage
Then SELECT the right package and OK, hopefully it will remove.
If that doesn't work, you can also try the following, which worked for me. Note that this is for my dev machine, not a regular user's machine, so I don't know how it would affect non-devs :-P
Take ownership of the folders c:\Program Files\WindowsApps and C:\ProgramData\Microsoft\Windows\AppRepository - giving Administrator full access. Make sure TrustedInstaller also has Modify rights as well. You're also taking ownership. If you're unawares, this is done via the Properties on that folder.
Go to Services and stop the Windows Installer service.
Open C:\ProgramData\Microsoft\Windows\AppRepository\ and delete the PackageRepository.edb file.
Start the Windows Installer service again.
Launch Visual Studio as Administrator.
Attempt to launch your app. It should work.
After you run the app once you should be able to run VS in user mode again.
Workaround:
If nothing else works for you (for me it didnt either), you can just change your Package Name in your app manifest (just replace last few characters with another characters). When you do this, you will no longer have conflicting packages.
Changing package name may not be appropriate for some scenarios, but you can always back it up and change it back when you finished debugging on your problematic device....