资源简介
这是综合网上的相关代码做了简化和测试,以保证完全可用。
1、配置好更新文件的web服务器,例如IIS服务器。
注意:要配置好服务器所能支持的文件下载类型,即MIME类型,否则下载时会出错。
假设下载地址为http://www.xxxxx.com
自动生成的程序和文件默认版本号均为1.0.0.0,
2、利用所带的AULWriter工具生成更新文件列表,即UpdateList.xml
将此文件放在web服务器下载文件相同目录下。
3、将这个autoupdate.exe和UpdateList.xml放到主程序下。
在你的主程序里调用这个autoupdate.exe文件即可。
当你想发布更新程序时,只需要更新web服务器上的文件,手工修改UpdateList.xml里的版本号即可。
例如web服务器上UpdateList.xml版本修改为1.0.0.1,客户端的UpdateList.xml里为1.0.0.0,即能升级。
源代码为VS2010,里面包含已编译文件,可直接使用。
主要参考:https://www.cnblogs.com/xiaxiaolu/p/4367159.html,非常感谢!
TODO 生成xml工具来不及做成自动更新版本了(根据datetime和size判断),有兴趣的朋友可继续完善。
2018.1.22

代码片段和文件信息
namespace AULWriter
{
partial class frmAULWriter
{
///
/// 必需的设计器变量。
///
private System.ComponentModel.IContainer components = null;
///
/// 清理所有正在使用的资源。
///
/// 如果应释放托管资源,为 true;否则为 false。
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
///
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
///
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmAULWriter));
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.prbProd = new System.Windows.Forms.ProgressBar();
this.btnExit = new System.Windows.Forms.Button();
this.btnProduce = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tbpbase = new System.Windows.Forms.TabPage();
this.txtUrl = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.btnExpt = new System.Windows.Forms.Button();
this.txtExpt = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnDest = new System.Windows.Forms.Button();
this.txtDest = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.btnSrc = new System.Windows.Forms.Button();
this.txtSrc = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbpOpt = new System.Windows.Forms.TabPage();
this.ofdSrc = new System.Windows.Forms.OpenFileDialog();
this.sfdDest = new System.Windows.Forms.SaveFileDialog();
this.ofdExpt = new System.Windows.Forms.OpenFileDialog();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tbpbase.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.Dockstyle.Top;
this.panel1.Location = new System.Drawing.Point(0 0);
this.panel1
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-01-22 12:00 AutoUpdate\
目录 0 2018-01-17 12:34 AutoUpdate\AULWriter\
文件 7278 2007-07-14 13:16 AutoUpdate\AULWriter\3.ico
文件 144 2018-01-17 01:58 AutoUpdate\AULWriter\app.config
文件 18718 2007-07-14 13:15 AutoUpdate\AULWriter\App.ico
文件 5504 2018-01-22 11:55 AutoUpdate\AULWriter\AULWriter.csproj
文件 676 2018-01-22 11:55 AutoUpdate\AULWriter\AULWriter.csproj.user
文件 21504 2018-01-17 12:22 AutoUpdate\AULWriter\AULWriter.suo
目录 0 2018-01-17 12:25 AutoUpdate\AULWriter\bin\
目录 0 2018-01-22 11:57 AutoUpdate\AULWriter\bin\Debug\
文件 594 2007-07-18 20:17 AutoUpdate\AULWriter\bin\Debug\UpdateList.xm
目录 0 2018-01-22 12:04 AutoUpdate\AULWriter\bin\Release\
文件 33792 2018-01-22 11:58 AutoUpdate\AULWriter\bin\Release\AULWriter.exe
文件 144 2018-01-17 01:58 AutoUpdate\AULWriter\bin\Release\AULWriter.exe.config
文件 28160 2018-01-22 11:58 AutoUpdate\AULWriter\bin\Release\AULWriter.pdb
文件 594 2007-07-18 20:17 AutoUpdate\AULWriter\bin\Release\UpdateList.xm
文件 16450 2018-01-17 10:38 AutoUpdate\AULWriter\Form1.Designer.cs
文件 9811 2018-01-17 10:52 AutoUpdate\AULWriter\frmAULWriter.cs
文件 17620 2007-07-18 20:14 AutoUpdate\AULWriter\frmAULWriter.resx
目录 0 2018-01-17 12:25 AutoUpdate\AULWriter\obj\
文件 460 2007-07-14 17:14 AutoUpdate\AULWriter\obj\ASP.CommonComponents.AULWriter.csproj.FileList.txt
文件 289 2007-07-18 20:19 AutoUpdate\AULWriter\obj\AULWriter.csproj.FileList.txt
目录 0 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\
文件 2038 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\AULWriter.csproj.FileListAbsolute.txt
文件 909 2018-01-17 02:06 AutoUpdate\AULWriter\obj\Debug\AULWriter.csproj.GenerateResource.Cache
文件 34304 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\AULWriter.exe
文件 7844 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\AULWriter.frmAULWriter.resources
文件 38400 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\AULWriter.pdb
文件 180 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\AULWriter.Properties.Resources.resources
文件 789 2018-01-17 01:56 AutoUpdate\AULWriter\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6210 2018-01-22 11:46 AutoUpdate\AULWriter\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
............此处省略69个文件信息
- 上一篇:用C#2010编写K3插件
- 下一篇:C#调用WebService和开发wsdl
相关资源
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- Winform可视化打印模板设计工具含源码
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论