UWP App Won't Start
Asked Answered
C

1

7

I have a UWP app. I'm using Visual Studio 2017 15.4.1. The UWP app is a store app and has been deployed to the Microsoft Store. My app was working fine in the store, and it was also working fine when I hit play in Visual Studio. Then recently, an isolated storage issue started occurring so I went in to the app in "Apps & Features" and hit Advanced Options -> Reset. Somehow this has fried my app installation on my machine. Our app no longer shows up as an installed app, and when I try to install the app from the store, I get an error with a code of 0x80073CF9. So, I can't uninstall, or reinstall on my machine. I've tried running sfc /scannow etc. to find out what's wrong, but nothing seems to help.

This wouldn't even worry me too much, but I can't even develop right now because when I try to run the app from Visual Studio, I get this error:

In order to debug this project, you must consume it from a Windows Store app project that creates a package and is marked as the Startup Project

I'm getting this error in the output window from the build

4>DEP0700: Registration of the app failed. [0x80073CF9] Another user has already installed an unpackaged version of this app. The current user cannot replace this with a packaged version. The conflicting package is [APP NAME] and it was published by CN=[Publisher].

What did I do wrong?

Carbuncle answered 23/10, 2017 at 1:53 Comment(11)
Give this a shot: Right-click on your UWP project in VS and click Properties. Then go to the Debug tab and check the box "Uninstall and then re-install my package..." Now give it a whirl.Vmail
Nah. No difference.Carbuncle
I've had issues like this before and I was able to fix my environment by killing the app from powershell. Take a look at this link (scroll down to Option 3) tenforums.com/tutorials/4689-uninstall-apps-windows-10-a.htmlVmail
I tried calling Get-AppxPackage in power shell, and our app didn't show up there.Carbuncle
I'm completely convinced that Windows has corrupted the installation of our app.Carbuncle
What app is this? Is it in the store now?Vmail
It's hidden from the public.Carbuncle
That's fine. Do you have another user on your computer? If you do, sign in as that user and make sure they've uninstalled the app.Vmail
Have you tried the StoreApp TroubleShooting? Settings > Security and Updates > TroubleShooting > Windows Store Apps.Clapperclaw
Have you tried Get-appxpackage -allusers *<appname>* | Remove-AppxPackage ? The allusers option is important here. You can also try to manually remove the content of the application cache folder in C:\Users\<your name>\AppData\Local\Packages\<your app id>. If you have one locked file here, the whole deployment will fail.Hoatzin
Champion! The app had gotten installed with a different username somehow and therefore I wasn't able to see it or uninstall it, and VS was not able to either. When I ran "Get-appxpackage -allusers", it appeared in the list. When I ran "Get-appxpackage -allusers <appname> | Remove-AppxPackage", the package was removed and then I was able to run my app from Visual Studio. @Vincent, please propose this as the answer.Carbuncle
H
4

You can use Get-appxpackage -allusers *<appname>* | Remove-AppxPackage

The allusers option is important here.

You can also try to manually remove the content of the application cache folder in C:\Users\\AppData\Local\Packages\. If you have one locked file here, the whole deployment will fail.

Hoatzin answered 24/10, 2017 at 10:57 Comment(2)
Note the other important part is that Get-appxpackage -allusers will list all installed apps for all users which was the key to finding the app in my system.Carbuncle
Also: * Be sure to run powershell as administrator * note that the appname might look like a guid. I found the following command useful for reviewing all the installed apps: Get-appxpackage -allusers | select name, packagefullname | sort namePersas

© 2022 - 2024 — McMap. All rights reserved.