What's the best way for a .NET winforms application to update itself without using ClickOnce?

前端 未结 9 2374
孤独总比滥情好
孤独总比滥情好 2020-12-23 17:29

For technical reasons, I can\'t use ClickOnce to auto-update my .NET application and its assemblies. What is the best way to handle auto-updating in .NET?

相关标签:
9条回答
  • 2020-12-23 17:59

    I wrote my own autoupdater, the autoupdater uses a common config file to the application which contains urls to download latest versions from / check if it needs to update.

    This way you run the updater, which either updates the app or not, then runs the application, which as part of normal operation, checks for an updated updater and patches that.

    0 讨论(0)
  • 2020-12-23 18:01

    Indigo Rose has a product called TrueUpdate that also does this for you. I have used them in the past from both managed and unmanaged apps. It is basically a file you put on your server (http, ftp, whatever you like). Then you call a client side EXE to check for updates. The updates file is pulled and has logic to detect what version is on the client (your choice, DLL detection, registry key reads, etc). Then it will find the appropriate updater for it and download the file for execution. It works well through proxies as well.

    The only thing they don't do is actually build the patches for you. You have to do that manually, or with another product they have. It is a commcerial solution and works quite well though if you need it.

    0 讨论(0)
  • 2020-12-23 18:06

    We have a product that's commercial/open source: wyBuild & wyUpdate. It has patching ability and is dead simple to use.

    Edit: I'm getting voted down into the negative numbers, but my post wasn't just blatant selling. Our updater, wyUpdate, is open source, written in C# and is licensed under the BSD license.

    I thought it might help anyone trying to build an updater from scratch using the .NET framework.

    But, vote me down if you must.

    0 讨论(0)
  • 2020-12-23 18:06

    As a starting point for rolling your own, it's probably worth looking at Alex Feinman's article on MSDN entitled "Creating Self-Updating Applications with the .NET Compact Framework".

    0 讨论(0)
  • 2020-12-23 18:07

    About 3-4 years ago I published an example that sits outside the app, if an update is detected, the app calls the updater ans shuts down, then the updates are done, and the app restarts.

    I published the example on the old GotDotNet site...I'll have to try and find it.

    It worked perfect and took about 1-2 hours to write.

    0 讨论(0)
  • 2020-12-23 18:08

    I think the Updater Application Block was something of a precursor to ClickOnce. Might be worth investigating. Looking at its source code might be enough to spark some ideas.

    0 讨论(0)
提交回复
热议问题