地址:https://www.fishlee.net/soft/simple_autoupdater/
项目调用方法
public void WaitUpgrade() { var u = Updater.Instance; var waitHandler = new System.Threading.ManualResetEvent(false); u.NoUpdatesFound += (s, e) => waitHandler.Set(); u.Error += (s, e) => waitHandler.Set(); u.ExternalUpdateStarted += (s, e) => Environment.Exit(0); u.UpdateCancelled += (s, e) => waitHandler.Set(); Updater.CheckUpdateSimple("更新地址", "update_c.xml"); waitHandler.WaitOne();
}
使用时候
//判断是否在调试模式下 #if !DEBUG //(!Debugger.IsAttached) { //升级检查 WaitUpgrade(); } #endif
使用生成更新包,
使用易量安装创建安装包