Solving Deploy Problem with UWP in Xamarin.Forms (DEP0700)

๐Ÿ‡บ๐Ÿ‡ฆ Bohdan Benetskyi
3 min readAug 1, 2019

--

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

  1. Find app in Start Menu or in Apps&Features and remove it.
  2. Restart VS.
  3. 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:

  1. Get List of registered Appx Packages
  2. Find our Appx. (easiest way by Publisher, because itโ€™s shown on Error List Window)
  3. Remove that Package for all Users
  4. Check that itโ€™s removed.
  5. 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/

--

--

๐Ÿ‡บ๐Ÿ‡ฆ Bohdan Benetskyi
๐Ÿ‡บ๐Ÿ‡ฆ Bohdan Benetskyi

No responses yet