Posted by David on Apr 25, 2013 in Blog, Visual Studio 2012, Windows 8 |
I recently have been trying to work on GoGetter for Windows 8 and came across a problem after compiling my code. The issue was that the solution compiled correctly, but after a build I was unable to run the application by going to Debug->Start without debugging.
I tried cleaning the solution, yet that didn’t work either. So I tried running a new Windows Store application. Again, it compiled correctly but did not run. This ended being a conundrum. The error that always kept popping up was ”DEP0600 : The following unexpected error occurred during deployment: The package repository is corrupted. (Exception from HRESULT: 0x80073CFE)”.

I searched and searched the web for a solution, but it really didn’t lead me anywhere. I found this thread that someone else was having the same issue:
http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/c8da65fe-dcf0-4a9f-9642-d340675b437f?utm_source=twitterfeed&utm_medium=twitter
I keep that thread in mind for reference and to contribute if i found a solution.
My friend David Garbacz, @garbaczd, pointed a couple of sites for me to look at. The first was a list of exceptions documented by Microsoft in regards to “Troubleshooting packaging, deployment, and query of Windows Store apps”.
http://msdn.microsoft.com/en-us/library/windows/desktop/hh973484(v=vs.85).aspx
The error was documented as:
ERROR_PACKAGE_REPOSITORY_CORRUPTED
0x80073CFE
The package repository is corrupted.
You may get this error if the folder referenced by this registry key doesn’t exist or is corrupted: HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\PackageRepositoryRoot. To recover from this state, refresh your PC.
At first I disregarded the error. I didn’t want to refresh my PC. All of the currently installed apps would be wiped from my system. The files, however, would not be affected. So, I took a look at the second site he mentioned and this fix could be easy, but it didn’t work.
http://blogs.msdn.com/b/zxue/archive/2012/03/14/windows-8-developer-how-to-quick-fix-for-visual-studio-11-beta-deploypackagename-error.aspx
I did not have the “Create GUID” option in Visual Studio available. Not sure why. However, a few friends pointed me into the right direction on creating a GUID so I could try to fix it with the second link’s suggestion on fixing my issue.

I had to go to the “Developers Command Prompt for Visual Studio 2012″ command prompt rather than the regular command prompt and by typing “guidgen.exe”. This then displayed the “Create Guid” window I needed. I then tried the second link suggestion, but again this did not work for me.
Well, as the exception stated:
You may get this error if the folder referenced by this registry key doesn’t exist or is corrupted:
HKLM\Software\Microsoft\Windows\CurrentVersion\Appx\PackageRepositoryRoot.
To recover from this state, refresh your PC.
I checked the registry key and all looked good. So the only available choice I did have was to refresh my PC. I performed a system refresh by going to PC Settings->General->Refresh your PC without affecting your files.
The refresh took a while to do. I let it do its thing, while I worked on other things. After the refresh, first thing I installed was VS 2012 with Update 2. After that, I loaded my solution and compiled and ran. It worked. The refresh makes a list of all of the apps you had installed, now uninstalled, and saves it as a html document to your desktop. I ended having to re-install all of my apps, since most were uninstalled by the refresh. I am not necessarily thrilled about that. Oh well, that is life. Hope this helps.
Read More