We are in a process of developing a really complex system consisting of several WCF services, ASP.NET MVC applications, administration tools (Windows Forms apps)... Some of those, will have instances running on several servers. We are looking for a good auto update solution for such a system. Most likely, we would need a separate auto update application (service) that will do the job, or some centralized admin application that will know about versions of all installed instances and do the update remotely. Is there any good product/library, made for this purpose, that you know about or had experience with?
-
1auto-update for WCF services, ASP.NET MVC applications? How would that be appropriate? Auto-update (such as click-once) is applicable to client applications, not server based services! – Mitch Wheat May 04 '09 at 11:04
-
6Whether its appropriate is debatable - change "auto update" to, erm, "smart deployment" and it certainly makes sense in theory, especially if you're deploying any element of the system to multiple services. Challenge is that you're dealing with potentially more complex install scenarios and security/rights issues. – Murph May 06 '09 at 06:52
-
The best solution for a separate auto update service that runs in the background is Google Omaha. It's what's used for Chrome. For an introduction to Omaha, see https://omaha-consulting.com/google-omaha-tutorial. – Michael Herrmann Jun 23 '20 at 16:28
5 Answers
Personally I'm using a very simple methodology for any kind of auto-update:
- Have an installer
- Check the new version (simple WebClient and compare numbers with your current AssemblyVersion)
- If the version is higher download the latest installer (should be over SSL for security reasons)
- Run the downloaded installer and close the application. (in this stage you need to have admin privileges if your installer requires you to be an admin)
The installer should take care of the rest. This way you'll always have the latest version and an installer with a latest version.

- 4,136
- 1
- 24
- 36

- 26,944
- 33
- 131
- 201
-
I will go with this approach, simple and effective rather than adding thirdparty projects, hard to maintain – Ahmed Nov 20 '12 at 14:13
-
Also, doing all that in the background will be the icing on the cake! – Shahid M Zubair Aug 19 '14 at 11:09
-
I also do this and it works very well as I can trust my installer to do a full and complete upgrade rather than some patching process. – DaveO Apr 26 '15 at 00:14
-
4
-
1@Momoro You can take a look at the MSIX technology - https://www.meziantou.net/deploying-a-dotnet-desktop-application-using-msix.htm#creating-the-msix-pa-3a8341 With it, you don't have to think about installing, background updating, and all of that. It's much better than ClickOnce, command-line usage works like a charm thanks to aliases, updates are non-obtrusive and could be used for background apps too. – Lev May 21 '21 at 11:36
-
@Lev Sorry for the late reply. I'll be sure to check out MSIX technology! Thanks! – Momoro Jun 06 '21 at 03:36
Let me start by saying I'm the founder of the company that has a complete updating solution which includes:
- An open source updater, wyUpdate, written in C# [BSD license]
- The open source AutomaticUpdater control that you can just add to your .NET app's form [LGPL license]
- wyBuild is used to build patches and manage your versions
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.
We also offer free licenses to wyBuild for open source projects, but if you're just looking to build your own updater you can cannibalize our source code freely.
That being said, if you want to build your own updater here are some tips:
Building your own updater
A good place to start is the wyUpdate and AutomaticUpdater source code I mentioned above. You can cannibalize it and use it for your own purposes. Some of the algorithms it contains:
- Full Windows Vista / Windows 7 UAC support
- Ability for limited users to check and then update if they have credentials
- Support for wonky corporate inernet. (If you've ever worked with a corporation this is a real problem).
- Quick extracting, patching, and installing of files.
- Registry support.
- Roll back files & registry on error or cancellation by the user
- Self-update (no files left behind)
We also have the file specifications here.
Automatic updating
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.

- 1,893
- 1
- 28
- 29
-
By 'Support for wonky corporate internet' do you mean bypassing the proxy issues? – Shahid M Zubair Aug 19 '14 at 10:59
-
2Yes, it bypasses _some_ proxy issues. So, for instance, there are cases where customers have misconfigured proxies, but trying to access files without the proxy works fine. So, wyUpdate first tries to use any proxy, and if it fails, then it tries again by deliberately avoiding the proxy server. Worst case scenario is that wyUpdate spends 1 or 2 seconds longer for cases where the proxy is misconfigured and there is no direct access to the internet/intranet. – Wyatt O'Day Aug 20 '14 at 04:33
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 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 for yourself.
Cold updates (requiring an application restart) is also supported, and done automatically unless "hot-swap" is specified for the task.
This boild 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'll get some more time, but honestly you should be able to quickly enhance it yourself for whatever it currently doesn't support.
Auto-updating WCF services and ASP.NET websites should be possible to do as well with it, using "hot-swap" of files and "iisreset" task where necessary.

- 4,472
- 1
- 30
- 37
We investigated a handful of options and decided to use the AppLife Update library for our enterpise project.
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.

- 1,775
- 2
- 18
- 30
-
It's not free but I must say that it looks quite amazing. It looks really complete and it is really easy to use from what I've tried. I guess if you have some time to spend on the updating process, you might program your own, but to get to this kind of result, it'd take a while. – SRKX Feb 20 '11 at 01:16
For simple WPF applications, those that maybe use Xcopy install, you can use this AppUpdater module. It's one source module, just a few lines of code, to add update capability to a simple WPF app.
It's free.

- 189,189
- 101
- 473
- 713