如何为 .NET winforms 应用程序创建安装程序,以便不需要安装?
我负责一个作为 ClickOnce 应用程序部署的内部应用程序。
当开发人员在发布几个新版本(由于新功能、错误修复或其他原因)后运行该工具并且该工具的输出不再符合开发人员的期望时,我们经常会遇到问题。这意味着开发人员需要额外的时间来更改代码以适应工具版本的差异。
我注意到 Redgate 的 .NET Reflector 工具不需要安装程序 - 它以 .exe 文件、一些 dll 和一些其他文件的形式存在。
如果我们的工具可以这样部署,那么就可以保留多个版本。
如何为 .NET winforms 应用程序创建安装程序,以便它能够以这种方式运行?
I'm responsible for an in-house application that is deployed as a ClickOnce application.
We run into issues reasonably frequently when a developer runs the tool after a a several new versions have been published (due to new features, bug fixes or whatever) and the output of the tool no longer conforms to what the developer is expecting. This means extra time is required of the developer to make changes to their code to accomodate the differences in the versions of the tool.
I have noticed that Redgate's .NET Reflector tool doesn't need an installer - it exists as a .exe file, some dlls and a smattering of other files.
If our tool could be deployed like this, it would be possible to retain multiple versions.
How do I create an installer for a .NET winforms application so it can be run in this way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无需执行任何特殊操作即可将应用程序部署为一组 exe + dll 文件。只需将文件从构建目录复制到客户端工作站(好吧,这过于简单化了,但仍然......)。
You don't have to do anything special to deploy your app as a set of exe + dll files. Just copy the files from your build directory to the client workstations (ok, that's oversimplifying, but still...).
我假设您想要一个可以安装一次,然后可以自动接收更新并自行更新的应用程序。诸如“wyUpdate”之类的商业包可以执行此操作:
http://wyday.com/wyupdate/
还有一个优点是它可以执行二进制修补,因此只下载增量来更新已安装的应用程序,而不是整个程序集。根据您的具体情况,这可能是一笔相当大的奖金。
此外,您可以使用 ILMerge 来打包所有程序集到一个“exe”文件中。 NuGenUnify 是 ILMerge(命令行工具)的一个很好的 GUI 包装器。将所有程序集打包到一个“exe”中可能意味着您也可以完全避免使用安装程序。
I am assuming that you want an application that can be installed once and can then receive updates automatically and update itself. A commercial package such as "wyUpdate" can do this:
http://wyday.com/wyupdate/
It has the added advantage that it can perform binary patching, so only deltas are downloaded to update installed applications, rather than whole assemblies. This can be quite a bonus depending on your circumstances.
Additionally, you could use ILMerge to package all your assemblies up into a single "exe" file. NuGenUnify is a nice GUI wrapper over ILMerge (which is a command-line tool). Packing all your assemblies into a single "exe" could mean you could also avoid having an installer at all.