Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Every time my application gets update using clickonce method, older version folder stays there along with newer version. for example i have 1.0.0.0 version in my application, when I update this to 1.0.0.1 version, 1.0.0.0 this version of my Application folder also exist there, its not getting removed, if I update to 1.0.0.2, Previous version of my application folder 1.0.0.0 and 1.0.0.1 not getting deleted.

I want to remove all Previous versions folders of my Application when my Application is updated to latest as they are of no use to client anymore.


Thanks in advance for answers.
Posted
Updated 7-Jan-13 2:53am
v2

1 solution

Clickonce does not remove previous versions by default (as you've discovered!).
You will need to add your own custom script to detect and remove older versions. Note that it's usually a good idea to leave the immediately previous working version on their in case the client needs to rollback the install.

Here's a link to the microsoft article on creating a custom installer
http://msdn.microsoft.com/en-us/library/dd997001.aspx[^]

and to a similar codeproject article with sample code
ClickOnce application autostart & clean uninstall or the way to customize ClickOnce installation[^]
 
Share this answer
 
Comments
fjdiewornncalwe 7-Jan-13 17:28pm    
+5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900