Suggest a method for auto-updating my C# program [duplicate]

房东的猫 提交于 2019-11-28 06:29:49

Fairly well is not good enough :)

NAppUpdate is an open-source library I wrote to address just this. The general idea is to have the greatest flexibility, at the lowest overhead possible.

So, integration is super-easy, and the library does pretty much everything for you, including synchronizing operations. It is also highly flexible, and lets you determine what tasks to execute and on what conditions - you set the rules. Last by not least is the support for any updates source (web, BitTorrent, etc) and any feed format - whatever is not implemented you can just write by yourself.

Cold updates (requiring an application restart) are also supported, and done automatically unless "hot-swap" is specified for the task.

This all boils down to one DLL, less than 70kb in size.

More details at http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/

Code is at http://github.com/synhershko/NAppUpdate (Licensed under the Apache 2.0 license)

ClickOnce is perfect for this sort of scenario.

Shaikh Mohd. Nadeem

There is this great framework called NetSparkle and also this DotNetUpdater

I haven't used them yet but hope to do so very soon. You can try it out.

ClickOnce is a good solution, but if you wish to have total control then you can roll-your-own. I would suggest polling a webservice to find if there are later versions available, downloading required files to a side-by-side directory, and using a launcher (or updating a shortcut) to automatically launch the latest version.

This is a little complicated, but caters for situations where the application may be running, and can therefore not be overwritten.

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