[英]MSI installer for .Net 5 background service
I have a .Net 5 console application that I am trying to run as a Windows service.我有一个 .Net 5 控制台应用程序,我试图将它作为 Windows 服务运行。 I have followed all of the articles online on how to do this and have it completed successfully (ie: using BackgroundService).我已经关注了所有关于如何执行此操作并成功完成的在线文章(即:使用 BackgroundService)。 The question is, I want to have an MSI installer to deploy this and all of the articles I have read about creating a service in .Net 5 instruct me to install the service manually using a command prompt or power shell and issuing the "sc" command.问题是,我想要一个 MSI 安装程序来部署它,我读过的所有关于在 .Net 5 中创建服务的文章都指导我使用命令提示符或电源外壳手动安装该服务并发出“sc”命令。
Back before .Net 5, I could use the built in Visual Studio Installer extension and simply create an MSI that would deploy and install my service.回到 .Net 5 之前,我可以使用内置的 Visual Studio 安装程序扩展,并简单地创建一个 MSI 来部署和安装我的服务。 I can't seem to make that work for .Net 5.我似乎无法为 .Net 5 工作。
Is it still possible to use the built in Installer extension to deploy and install my .Net 5 BackgroundService?是否仍然可以使用内置的安装程序扩展来部署和安装我的 .Net 5 BackgroundService?
Thanks!谢谢!
Installing Services : There are many ways to install services, you should use an MSI package and the built-in mechanisms there to install and start the service and stop and update it during upgrades.安装服务:安装服务的方法有很多种,您应该使用 MSI 包和那里的内置机制来安装和启动服务,并在升级期间停止和更新它。
Various ways to install services (with links to samples on how to install services using MSI). 安装服务的各种方法(提供有关如何使用 MSI 安装服务的示例链接)。
Learning WiX : Please see the WiX section here - the links should get you started.学习 WiX :请参阅此处的WiX 部分- 这些链接应该可以帮助您入门。 Direct link to the main WiX link list . 直接链接到主 WiX 链接列表。
Links:链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.