问题
We are developing a Windows based application in C#. I want to provide auto updates for the software. In fact, once the user run the program it should be able to notify the user that it is going to get the latest version from the server. We have created our setup by using Visual Studio setup creator. Then the software can capture if there is any updated version. We are providing support for all our users and we update their servers if there is any updates from our side. If there is any update we can update an entry in the user's database. My question now is, where should I store the latest updates for users.
My intial approach was to store the updated setup files in a shared folder in their server. But our company has had a lot of troubles with that approach in the past. So, I had to given up that approach. What I am thinking now is to upload the executables in the SQL Server. Our setup file is 60Mb at the moment but it can be increased over 100Mb some time in future. What do you think? Would it be a feasible solution? Do you have any better ideas?
回答1:
Try NetSparkle. Its an easy-to-use software update framework for .NET developers.
回答2:
It's very hard to give any meaningful answer without knowing why you don't like clickonce. Personally, I find that while clickonce isn't great for all deployments, it is very good for many - and in many cases it isn't adopted because developers don't know how to configure for it or get the most from it.
If you really can't use clickonce, take a look at Google's project omaha, which is a neat auto-updater that is already installed on any windows machine running Chrome.
And finally, if you are going to roll your own, I would probably not suggest storing it in SQL Server without first checking to see how this would affect your backup and replication strategies, at the least. I don't really see what advantage you would get over a HTTP, UNC, FTP, or similar storage area.
回答3:
Don't store a large executable in the database.
I'm sure you could find a pre-build solution, but if you are determined to write it on your own, you might consider simply storing a URL pointing to the latest version, on a server you deploy. The update software on the client would simply authenticate with that server, download the new version and then install it.
来源:https://stackoverflow.com/questions/5130765/software-auto-update