Best Way For Update Application

我的未来我决定 提交于 2019-12-02 11:53:50

ClickOnce deployment does incremental updates. When you deploy an update, if the date/time stamp and hash of the file are the same as the last version, ClickOnce copies them from the cached version into the new version instead of copying them across the internet.

If you have several projects in one solution, ClickOnce will deploy each of these every time, because they are recompiled and rehashed when you build the solution. BUT if you have projects that you do not think will change a lot, you can put them in a separate solution, build them, and include the dll in the main application. Then it won't be rebuilt and rehashed every time you publish, and won't be copied across the internet again.

As for starting from the internet, you can specify that the application be run online-only, which requires that the user be able to connect to the deploymnet manifest (.application file) and be able to check for updates every time he runs it.

Note that most people set ClickOnce to check for updates and install them before running, which ensures the customer is always running the most recent version.

I'm not certain what this means: "I need to update of the program does not needing stop".

If you want to update a ClickOnce application without forcing the user to close it, you can use the programming APIs to check for an update and install it, but you will have to restart the application in order to install the updates. (Application.Restart()).

AS far as I know clickonce won't do what you want.

One option would be to take the source for a file diff application and retrofit it to compare the bytes of your binaries (V1.0 & V1.1 for arguments sake).

You'll then have make an instructions file that explains how to turn V1.0 into V1.1 with the output of this differential program.

You'll then need to write an updater app, that takes the upgrade instructions and turns V1.0 into V1.1 with them.

This way only the changed bytes have been sent over the wire and not the entire program

Have a look at this: http://www.codeproject.com/KB/files/LPTextFileDiff.aspx

Hope this helps :-)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!