如何使用 WiX 安装程序安装 WCF 服务?
在这种情况下,如何为 WCF 服务创建 WiX 安装程序?
- 开始时用户选择托管:自托管、IIS 中、系统服务中。
- 根据他的选择,我需要安装 3 组不同文件中的一组,执行特定的自定义操作等。
如何在一个安装程序中实现这一点?
附言。我已经制作了用于安装 IIS 托管 WCF 的安装程序。
但如何做到三合一呢?
How do I create WiX installer for WCF service in this case?
- At the start user choose hosting: self-hosting, in IIS, in system service.
- Depending on his selection I need to install one of 3 different sets of files, do specific custom actions etc.
How to implement this in one installer?
PS. I have made installer for installation of IIS-hosting WCF.
But how to do 3-in-one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最好的办法是在安装程序中拥有单独的功能。在每项功能下,您都可以拥有构成每种托管类型的组件(请每个 dll 一个组件)。然后,您还可以将任何自定义操作以组件操作为条件state
如果您尚未将所有服务逻辑分离到可以由宿主项目(Web 服务、Win 服务等)引用的自己的程序集中。因此,在极其简化的输出文件列表中,您将拥有:
它们的所有目标目录可能都是相同的,但每种托管类型都有一个目录可能是有意义的。在这种情况下,需要将 Common.dll 复制到每个文件夹,并且每个位置都需要一个单独的 wix 组件。
使用功能选择树的默认 UI 可以工作,但我不相信您可以强制只选择单个功能。如果您想选择更自定义的功能,您应该开始阅读本文
Best bet is to have separate Features in the installer. Under each feature you can have the components (one component per dll please) that make up each hosting type. Then you can also have any custom actions be conditional on component action state
If you haven't already separate all of the service logic into its own assembly that can be referenced by the host projects (Web Services, Win Service, etc). So in the grossly simplified list of output files you'd have:
It would be possible to have all of their target directories be the same one, but it probably makes sense to have a directory per hosting type. In that case Common.dll would need to be copied to each folder and would need a separate wix component for each location.
The default UI using the feature selection tree would work, but I do not believe you can force only selecting a single feature. If you want to go with a more customized feature selection you should start with reading this