Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# .NET VB.NET
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 7-Jan-13 2:50am
Edited 7-Jan-13 2:53am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Comments
Marcus Kramer at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.140709.1 | Last Updated 7 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid