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.