How to diagnose metro app deployment errors?

2019-07-15 09:54发布

问题:

When trying to debug a Metro project from VS, I came across this error:

DEP0700 : Registration of the app failed. Another user has already installed a packaged version of this app. An unpackaged version cannot replace this. The conflicting package is PACKAGENAME and it was published by CN=some Guid. (0x80073cf9)

But I have already uninstalled the app from the Start page, also, I can confirm that there is no entry left in Add/Remove program.

And since the access to the "%PROGRAMFILES%\WindowsApps" folder where the app files reside in is blocked, so I have no way to see if the app is still there.

However, I can still find many 'PACKAGENAME' occurances in the registry.

How to diagnose this? How to get rid of the "packaged version" so I can start debugging from VS?

回答1:

Try installing the app from the windows store again, and then uninstall it from the start page. It appears that when Visual Studio does the uninstall it doesn't do it right.



回答2:

1) Go to your Package.appxmanifest file in your solution
2) Go to the identity tag.
<Identity Name="xxxxxxx-yyyy-zzzz-tttt-bbbbbbbbbbbbb"
Publisher="CN=bigbob"
Version="1.0.0.0" />

3) Change the value of the Identity Name (Ex from ...bbbbb to ...bbbbc)
4) Rebuild and run

Source:
http://www.sempf.net/post/MetroUIAnother-user-has-already-installed-an-unpackaged-version-of-this-application.aspx



回答3:

Are you sure you didn't just unpin the app? Try doing a search for it and see if it is still there.



回答4:

I find a solution to the problem. It's said it is a "staged package" that does not show up in my start page so I can not uninstall it in normal way. I follow the steps, and successfully get rid of that "un-uninstallable" :) package.



回答5:

This blog post was helpful, although after an hour or so of troubleshooting it turns out that I had indeed installed the package under another user account. After switching accounts and uninstalling from the start screen it worked fine.