How to automatically update a C# .Net console application?

左心房为你撑大大i 提交于 2020-01-05 08:33:00

问题


I have a Console application (executable) written in C# .Net that users download and run locally. The users download a zip and extract it to a local directory and run (using command line parameters) via the command line from that location.

Since users will not check for new version I need a way for the executable to check for a newer version of itself and automatically download it and overwrite itself (or at least notify the user).

I have looked at the possibility of using clickonce but that is geared towards windows applications.

All the questions/threads I have looked at only concern auto updating windows applications so are no good for this scenario.

Is there a way (or pattern) to auto update a .Net console app or do I have to write code within the console app to check its version against the server and notify the user?

If its made Clickonce it will break it as a console app - http://social.msdn.microsoft.com/Forums/en-US/8be48914-6563-47cb-9bff-e5e72047bb69/c-console-application-always-is-a-click-once-app

来源:https://stackoverflow.com/questions/26222107/how-to-automatically-update-a-c-sharp-net-console-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!