NAppUpdate - Application auto-update framework for .NET(Cross-posted from BigData Boutique Blog) Any desktop applications programmer finds himself every now and then looking for a library providing an application auto-update functionality, that is flexible and easy-to-integrate. I had the intention of working on such a library for some time now, so it will do things the way I want it to. Last week I got to actually doing it, and I'm quite satisfied with the results. NAppUpdate can be integrated easily with any .NET application - WinForms or WPF, and it offers great flexibility through interfaces, for feed readers, file sources, and update tasks. It also supports conditional updates, the implementation of which offers unlimited extendibility. I based my work on Lee Treveil's .NET-Auto-Update, and although I practically rewrote almost everything, he certainly deserves this credit. The library, released under the Apache 2.0 software license, can be downloaded / cloned from http://github.com/synhershko/NAppUpdate. Please share your thoughts, or any extension you make to it. Update 30/03/2011: A user/developer discussion group is now available at: http://groups.google.com/group/nappupdate
Update 30/09/2010: although most of the post below is still true, it is already (!) a bit outdated. Please check the NAppUpdate tag in this blog for the latest information on the library.At the time of this writing, here is what NAppUpdate offers:
- Seamless integration - one DLL to reference, a few lines of code in the right places and you are all set.
- Requires .NET 2.0 and up. No other silly requirements.
- Cold updates supported. The updater executable used for replacing files that cannot be hot-swapped is packaged within the library's DLL, and is self-deleting, once done updating.
- Shoot and forget, just tell NAppUpdate to prepare and apply your updates once you have notified of their existence, and it will do everything for you, including restarting your application after a cold update.
- State-based update process (Did / didn't check for updates; prepared updates; applied updates successfully; rollback required). You can quit any time you wish.
- Updates are tasks, so practically every type of update is supported. Right now the only implemented task is FileUpdateTask, used for simple file download and replacement. Implementing more tasks is very easy, and can be done right from your application simply by implementing an interface, without any extra work.
- Potentially supported tasks include registry updates, database updates (schema and/or data), Lucene index changes, diff patches, and virtually anything you can imagine.
- Backup and rollback are supported in the task level, giving you full protection against failures.
- Conditional updates - every task can have unlimited number of conditions attached to it. Conditions are evaluated in a boolean manner, and can be grouped together with AND, OR'd, or being defined as NOT. If the conditions aren't met, the task is being ignored.
- Just like with tasks, custom conditions can be created very easily by implementing an interface with your own logic, within your very own application.
- Condition types supported at the time of this writing include file properties checks (exists, assembly version, size, date, SHA256 checksum) and OS bitness condition (32/64 bit). More planned conditions include registry checks, more OS checks, prerequisites checks (.NET version and other common applications), etc.
- Multiple update feed formats, including Adobe Appcast and our very own NAppUpdate XML (NauXml). You can create your own by simply implementing IUpdateFeedReader.
- Abstract download sources allow you to create your own implementation for downloading feeds and update files / packages. Currently we have SimpleWebSource and MemorySource implemented. Your own implementations can include whatever other source you want, for example transfer files over BitTorrent or other P2P protocol.