tags:

views:

591

answers:

1

.NET ClickOnce applications get deployed into a subfolder of C:\Documents and Settings\\Local Settings\Apps\2.0. In development we tend to make a large number of small changes and with regular deployments a lot of junk can accumulate into this folder. Surprisingly 'Delete Temporary Internet Files' does not remove old stuff from this folder. Does anyone know if Windows / .NET takes any steps to remove stuff from here or does it just go on accumulating. Thanks!

+3  A: 

Mage is a ClickOnce tool that comes with the framework sdk. The command...

Mage.exe -cc

...will clear out your application cache. You may have to search a little to find mage. Different versions of the sdk seems to install in different locations. On my machine it's located here, C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mage.exe.

Another alternative is to use the publish option that makes your application available offline. You will then get an entry in your regular "Add/Remove Programs" that you can use to remove applications.

whatknott
Hi,The client machine does get bloated with different version of the application in their cache folder. Is there an option in Clickonce to clear the client cache periodically or something? Not sure why the earlier versions of the application still persist in that folder. If the client does not clear the cache, its going to be a big junk there.
theraneman
Also, the mage -cc option did not clear cache for me. I tried the path you provided. Although by the removing the program from Add/Remove it did clear the cache.
theraneman
@theraneman the cache should only keep the current version and one prior. not sure why mage -cc didn't clear your cache, but typically i just do that to get rid of apps that are "online only" and don't show up in add/remove programs.
whatknott