Clearing ClickOnce App Cache

ClickOnce was frequently used for custom WinForms apps that were deployed within small to medium business environments. The ease with which the installer can be created combined with auto updating being a base feature made it attractive. However, it can fail to work with alarming frequency. When that happens, there is a simple command that will improve the chances of a reinstall succeeding:

rundll32 dfshim CleanOnlineAppCache

This command does what the argument claims: it cleans the "app cache", which is where Click Once installs are located. I recommend uninstalling the offending app, running that command and then reinstalling normally. This fixes most ClickOnce install issues. In some extreme cases, I have found filesystem damage within

%LocalAppData%\Apps\2.0

which required renaming the damaged files out of the way of the installer and running a disk repair on the machine.