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

  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

Microsoft MVP | C# .Net | Xamarin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store