On the Mac there's a really nice library called Sparkle that programs can use to implement the checking/install functionality for auto-updates.
Is there anything similar out there for .NET? Or just regular Win32?
Cheers,
On the Mac there's a really nice library called Sparkle that programs can use to implement the checking/install functionality for auto-updates.
Is there anything similar out there for .NET? Or just regular Win32?
Cheers,
ClickOnce is my preferred method. It has some warts, but it comes with Visual Studio and works reasonably well.
Click-once is heavily used but you can do what I did for a large application and try these:
Application Auto Update in VB.NET
Application Auto Update Revisited
I tinkered with the logic a bit and built what I thought was a better XML update file. Now, when I need to update the clients, I just post the new exes or dlls and set the correct versions in the public XML file. My app detects the newer versions if it is older and updates itself. If youare doing this on Vista, you need to prompt for Admin permissions so that Program Files can be written to (if you install there)
You can also easily convert this to C# using this:
Click once has it's own security limitations (understandbly so). If you want the full power and control of a windows app then go with the .net application updater component. It works like a charm and has even been used by ms internally for their .net based game (don't remember the game name though)
Here is the link for more info - http://windowsclient.net/articles/appupdater.aspx
There is a really nice utility here called Updater. Look like it is written in c or c++. I have been able to configure the xml files and load them to the production server, and then I can have the Updater Run and check the xml file for a different version and download a new update install package that I built using the Nullsoft Scriptable Install System.
We investigated a handful of options and decided to use AppLife Update.
AppLife Update can quickly and easily add auto update functionality for your .NET apps but is also flexible because of it's comprehensive API.
See the full list of features and some demo videos on their website.
Dot Net Auto Update
I've implemented a library to do this called DotNetAutoUpdate (original name eh?). It aims to be:
Let me start by saying we offer a complete updating solution which includes:
wyUpdate handles all of the Vista/Windows 7 UAC problems and all the file permission problems that inevitably pop up when you're trying to update complex software.
That being said, if you want to build your own updater here are some tips:
A good place to start is the wyUpdate C# source code I mentioned above. You can cannibalize it and use it for your own purposes. Some of the algorithms it contains:
We also have the file specifications here.
Since being automatic is a requirement let me tell you how we do it with our AutomaticUpdater control.
We use named pipes to communicate between the standalone updater (wyUpdate) and the Automatic Updater control sitting on your program's form. wyUpdate reports progress to the Automatic Updater, and the Automatic Updater can tell wyUpdate to cancel progress, to start downloading, start extracting, etc.
This keeps the updater separate from your application.
In fact, the exact named pipes C# code we use is included in an article I wrote a little while back: Multi-process C# app like Google Chrome.
Here's an open-source solution I wrote to address specific needs we had for WinForms and WPF apps. 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 make the rules (or use some that are there already). Last but not least is the support for any update source (web, BitTorrent, etc) and any feed format - whatever is not implemented you can just write for yourself.
Cold updates (requiring an application restart) are also supported, and done automatically unless "hot-swap" is specified for the task.
This 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)
I plan on extending it more when I get some more time, but honestly you should be able to quickly enhance it yourself for whatever it currently doesn't support.