简体   繁体   English

如何为.NET winforms应用程序创建安装程序,使其不需要安装?

[英]How do I create an installer for a .NET winforms application so it doesn't need to install?

I'm responsible for an in-house application that is deployed as a ClickOnce application. 我负责部署为ClickOnce应用程序的内部应用程序。

We run into issues reasonably frequently when a developer runs the tool after aa 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. 我注意到Redgate的.NET Reflector工具不需要安装程序-它以.exe文件,一些dll和少量其他文件的形式存在。

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? 如何为.NET winforms应用程序创建安装程序,以便可以以这种方式运行?

You don't have to do anything special to deploy your app as a set of exe + dll files. 您无需执行任何特殊操作即可将应用程序部署为一组exe + dll文件。 Just copy the files from your build directory to the client workstations (ok, that's oversimplifying, but still...). 只需将文件从构建目录复制到客户端工作站(好吧,这过于简单了,但仍然...)。

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: 商业软件包(例如“ wyUpdate”)可以执行以下操作:

http://wyday.com/wyupdate/ 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. 此外,您可以使用ILMerge将所有程序集打包到一个“ exe”文件中。 NuGenUnify is a nice GUI wrapper over ILMerge (which is a command-line tool). NuGenUnify是ILMerge(一个命令行工具)上不错的GUI包装。 Packing all your assemblies into a single "exe" could mean you could also avoid having an installer at all. 将所有程序集打包到一个“ exe”中可能意味着您也可以完全避免安装程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为.NET Windows应用程序编写安装程序(需要安装Access驱动程序) - How do I write an installer for a .NET Windows application (need to install Access drivers) 如何在Winforms中创建仅具有exe且无依赖关系的安装程序? - How do I create an installer with only exe and no dependencies in Winforms? 如何使用基于WiX的安装程序为.NET应用程序创建性能计数器? - How do I create performance counters for a .NET application with a WiX-based installer? 如何将.NET控制台应用程序转换为Winforms或WPF应用程序 - How do I convert a .NET console application to a Winforms or WPF application 如何作为安装程序的一部分在Win8上静默安装.Net3.5? - How do I install .Net3.5 on Win8 quietly as part of an installer? 如何为 .Net 服务创建一个自动接受输入并安装先决条件的安装程序 - How to create an installer for a .Net service that takes inputs and install prerequisites automatically .NET配置文件-我需要在安装程序中包含它吗? - .NET configuration file - Do I need to include it in installer? 销售 .NET 库集。 我需要安装程序吗? - Selling a .NET set of libraries. Do I need an installer? 如何重构WinForms应用程序? - How do I refactor a WinForms application? 如何在winforms应用程序中测试本地化? - How do I test localization in a winforms application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM