WinForm universal auto Updater project practice, winformautoupdater
I. background
Recently, the organization has developed a project that requires the automatic upgrade function. Because automatic upgrade is a common feature and may be used in many programs, I want to write an Automatic Upgrade Component. In the application, you only need to reference this Automatic Upgrade Component and add a small amount of code to implement the automatic upgrade function. Because our program may contain multiple types of files, such as exe, dll, config, xml, bat, and other customized format extension files, we need to support updates of multiple file types.
In this article, we will share with you how to develop and implement the WinForm universal auto Updater from the perspective of Alibaba Cloud's real project scenarios, if you are interested in the content of this tutorial, please allow Alibaba Cloud to learn with you!
We don't need to talk much about it. We just need to get the dry goods directly. We don't make the dry goods, but we are just the porters of the dry goods.
Have you learned how to count from 1 to 10? Iii. Project implementation principle diagram
3.1 AutoUpdater schematic of WinForm universal auto-Updater
Implementation idea: put an XML file on the Remote IIS automatic upgrade server, which records some information such as the software version number, release date, and DLL to be updated, if the version number of the local software is not the same as that on the server, replace the local file.
Schematic diagram
3.2. The core technical problems we need to solve today can be summarized as follows:
How does one achieve Remote IIS virtual directory file download through the HTTP protocol?
3.3. Q: How does the WinForm Universal Automatic Updater AutoUpdater download files?
Supports FTP and HTTP. We recommend that you use HTTP.
4. knowledge points involved in coverage
How to pass and receive parameters between two independent Winform programs;
How to download remote site files through HTTP;
How does IIS automatically upgrade virtual sites;
For example, how can I configure iisto enable the download of a custom file with a suffix, such as .apk,. config,. bat, and. pdb;
AutoUpdateXmlBuilder: Use of the automatic installer packaging tool;
And so on ......