C# – Suggest a method for auto-updating the C# program


I need to keep a program I've written up to date, this will happen frequently over the next year or so, this will need to be done over the Internet. Where would you suggest I start, are there any common techniques? Any suggestions welcome.


Best Answer

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)