软件自动更新
我们正在用 C# 开发一个基于 Windows 的应用程序。我想为软件提供自动更新。事实上,一旦用户运行该程序,它应该能够通知用户它将从服务器获取最新版本。我们已经使用 Visual Studio 安装程序创建器创建了我们的安装程序。然后软件可以捕获是否有任何更新版本。我们为所有用户提供支持,如果我们这边有任何更新,我们会更新他们的服务器。如果有任何更新,我们可以更新用户数据库中的条目。我现在的问题是,我应该在哪里为用户存储最新的更新。
我最初的方法是将更新的安装文件存储在服务器的共享文件夹中。但我们公司过去在这种方法上遇到了很多麻烦。所以,我不得不放弃这种做法。我现在的想法是上传SQL Server中的可执行文件。我们的安装文件目前为 60Mb,但将来可能会增加到 100Mb 以上。你怎么认为?这会是一个可行的解决方案吗?您有更好的想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
尝试 NetSparkle。它是面向 .NET 开发人员的易于使用的软件更新框架。
Try NetSparkle. Its an easy-to-use software update framework for .NET developers.
如果不知道为什么你不喜欢clickonce,就很难给出任何有意义的答案。就我个人而言,我发现虽然 clickonce 并不适合所有部署,但它对许多部署来说非常好 - 并且在许多情况下它没有被采用,因为开发人员不知道如何配置它或从中获得最大收益。
如果您确实不会使用 clickonce,请查看 Google 的 project omaha,这是一个简洁的自动更新程序已安装在任何运行 Chrome 的 Windows 计算机上。
最后,如果您打算自行部署,我可能不建议您在不首先检查这将如何影响您的备份和复制策略的情况下将其存储在 SQL Server 中。我真的不明白通过 HTTP、UNC、FTP 或类似的存储区域可以获得什么优势。
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.
不要在数据库中存储大型可执行文件。
我确信您可以找到预构建解决方案,但如果您决定自己编写它,则可以考虑在您部署的服务器上简单地存储指向最新版本的 URL。客户端上的更新软件只需通过该服务器进行身份验证,下载新版本,然后安装它。
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.