点击一次更新的问题,需要帮助 [英] Problem with click once update, need help

查看:92
本文介绍了点击一次更新的问题,需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我的应用程序使用clickonce方法获取更新时,旧版本文件夹与新版本一起保留。例如我在我的应用程序中有1.0.0.0版本,当我将其更新为1.0.0.1版本时,1.0.0.0此版本的我的Application文件夹也存在,如果我更新到1.0.0.2,则不会删除它,以前的版本我的应用程序文件夹1.0.0.0和1.0.0.1没有被删除。



当我的应用程序更新为最新版本时,我想删除我的应用程序的所有以前版本的文件夹它们对客户来说毫无用处。





预先感谢您的答案。

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.

推荐答案

默认情况下,Clickonce不会删除以前的版本(正如您所发现的那样!)。

您需要添加自己的自定义脚本来检测和删除旧版本。请注意,如果客户端需要回滚安装,通常最好保留以前的工作版本。



这里是一个链接关于创建自定义安装程序的微软文章

http://msdn.microsoft .com / zh-cn / library / dd997001.aspx [ ^ ]



以及带有示例代码的类似代码项目文章

ClickOnce application autostart&干净卸载或自定义ClickOnce安装的方法 [ ^ ]
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[^]


这篇关于点击一次更新的问题,需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆