I have a .NET application that I distribute using ClickOnce and I make available online only. How do I clear the download cache from a users' machine that doesn't have Visual Studio installed?
Asked
Active
Viewed 6.7k times
1 Answers
82
Visual Studio isn't needed, just Mage. It comes with the Windows SDK for people that haven't gotten it via Visual Studio or the Framework SDK.
Another option would be to write code to clear the cache. Or you could have them delete the folder ClickOnce files are installed in (C:\Users\[username]\AppData\Local\Apps
on my Windows 7 machine). That would be a last resort since it will remove every ClickOnce application they have installed.
You don't have to have Mage installed to clear the cache; running rundll32 dfshim CleanOnlineAppCache
from the command line accomplishes the same thing as mage -cc
.

Peter Mortensen
- 30,738
- 21
- 105
- 131

codeConcussion
- 12,739
- 8
- 49
- 62
-
21Thanks! Someone left a comment to the link you provided and left this gem: "Another option: Run this from the command-line: rundll32 dfshim CleanOnlineAppCache" Exactly what I needed. – isorfir Mar 10 '10 at 22:57
-
1dfshim is [part of ClickOnce](https://stackoverflow.com/questions/17714192/issue-with-registry-key-of-dfshim-dll), and ClickOnce is [part of the .Net framework](https://en.wikipedia.org/wiki/ClickOnce), for anyone else who is wondering. – Chris Nov 29 '18 at 15:31