C # Use clickonce technology to deploy and upgrade the system

Source: Internet
Author: User

For a C/S architecture system, especially a layer-3 distributed application, it is very troublesome to deploy and upgrade the system. If there is a small modification, multiple clients must be upgraded, if the network is inconvenient, You have to upgrade it yourself. This kind of thing has no value but to face. If it is implemented based on C #, it's better to use clickonce. It's easy! Convenient!

The following is a test post for your reference!

1. Create a winform-based project: clickoncedemo

Put a button on the Interface

Private void button#click (Object sender, eventargs E)

{

MessageBox. Show (system. reflection. Assembly. getexecutingassembly (). Location );

}

2. After compiling, enter the project property settings. Go to the "publish" option.

The address of your server is released, for example:Http: // 192.168.1.1/clickoncedemo/

Other options can be used by default.

3. Release it!

If everything goes smoothly, a page is automatically opened, and the address of the page is the above address.

There is a "run" button on this page. After you click it, your published system will be automatically downloaded.

It is automatically installed on your machine after running,

4. You can test whether your release is successful: Change the version number of the system to be released (1.0.0.0-> 1.0.0.1)

(IN APPLICATIONProgramCan be changed in the "assembly information" of the option) and then released.

Then you can directly run the system you have installed (usually in the Windows Start Menu). At this time, the system will automatically prompt you whether to replace a new version !!

OK! You have succeeded.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.