Solving Deploy Problem with UWP in Xamarin.Forms (DEP0700)
Today I would like to tell about one specific deployment problem occurred on Visual Studio 2019 v16.2.0 and steps for solving it.
Registration of the app failed.
This may happen if you switching git branches with opened Visual Studio instance. And from this moment you canโt deploy your UWP app.
Ok, so what should we do with it? And here we have a couple of solutions, itโs depended by the depth of your glitch.
Solution #1
I will start with a dummy solution. Just restart your Visual Studio. Restarting Windows is not required here, rarely in such situation restart will help to solve our problem.
P.S. At the end in all next solutions we will restart Visual Studio instance, itโs important and required to affect solution changes.
Solution #2
- Find app in Start Menu or in Apps&Features and remove it.
- Restart VS.
- Be happy ๐.
Solution #3
Ok, you made First and Second solutions but still get that error during deploy in VS?
You may be wondering again why?
Welcome to more hardcode way to clean up windows from appx applications ๐
Now we will:
- Get List of registered Appx Packages
- Find our Appx. (easiest way by Publisher, because itโs shown on Error List Window)
- Remove that Package for all Users
- Check that itโs removed.
- Restart VS ๐
Looks simple, right? Letโs begin!!!
Please run your PowerShell Console in Administrator Mode!!!
Command to get registered packages get-appxpackage
. We need to add a flag -all
for list all in the system.
Command to remove the package remove-appxpackage
required PackageFullName as the parameter. Also, we need to add a flag -AllUsers
to remove for all Users.
Thatโs all ๐ ๐ ๐. Thanks for reading, hope it will help you ๐
P.S. => Later I found this article, on MSDN Blog https://blogs.msdn.microsoft.com/wsdevsol/2013/01/28/registration-of-the-app-failed-another-user-has-already-installed-a-packaged-version-of-this-app-an-unpackaged-version-cannot-replace-this/