I had a user complain that they were unable to launch an application that was published using ClickOnce. They were kind enough to pass along a log file that the error message provided making finding the issue very easy. The log file contained the following error:
Following errors were detected during this operation.
* [6/7/2010 10:54:17 AM] System.Deployment.Application.DeploymentException (Subscription)
- Unable to install this application because an application with the same identity
is already installed. To install this application, either modify the manifest version
for this application or uninstall the preexisting application.
- Source: System.Deployment
I took this to mean that the user needed to remove the currently installed version of the application, and remove it. However, the application must be launched from the deployment page, and cannot be installed local. So how do you clear this cache for ClickOnce deployed applications? Easy, Google knows. I just needed to use a simple command line tool mage.exe (Manifest Generation and Editing Tool). For me it was found in /Program Files/Microsoft Sdks/Windows/v7.0A/bin. Calling the tool like this mage -cc cleared the cache. However, on a machine for non developers, this was not an option, as they don't have the Sdks on their machines. So, I needed an alternative.
A little more Google-fu resulted in an alternate call that would do the same thing on a computer without development sdks. And I know some day I'll need to remember this, so here it is: rundll32 dfshim CleanOnlineAppCache