Auto update for WinForms application

前端 未结 4 1241
故里飘歌
故里飘歌 2020-12-12 23:15

When creating an auto updating feature for a .NET WinForms application, how does it update the DLLs and not affect the currently running application?

Since the appli

4条回答
  •  感动是毒
    2020-12-12 23:19

    I have a seperate 'launcher' application that checks for updates via a web service. If there are updates, it downloads them and then executes my application, which is in a seperate assembly.

    The other alternatives are using things like ClickOnce, or downloading the files to a seperate area and restarting the app, as someone else mentioned.

    Be warned about ClickOnce, though - it's not as flexible as it sounds. And if you deploy to a system that requires elevating your program to a higer security level to run, you might run into problems if you don't have a certificate for your app installed. I found it very difficult to get straight answers on the Internet to things like certificate management when it comes to ClickOnce. If you have a complex app, you may want to just roll your own updater, which is what I ended up having to do.

提交回复
热议问题