[英]How do you install a .NET 6 Windows Service (Worker Service) using a Visual Studio Installer project?
I Have a Worker Service written in c# that needs to be installed as a Windows Service (configured by calling the UseWindowsService
method).我有一个写在 c# 中的 Worker 服务,需要安装为 Windows 服务(通过调用
UseWindowsService
方法配置)。
This guide specifies how to create an installer for a .NET 6 application, but this installer only copies the app's files. 本指南指定如何为 .NET 6 应用程序创建安装程序,但此安装程序仅复制应用程序的文件。
How can I install the service contained in the executable?如何安装可执行文件中包含的服务?
There's a lot more steps to make it a service you can create.要使其成为您可以创建的服务,还有很多步骤。 See https://learn.microsoft.com/en-us/do.net/core/extensions/windows-service
参见https://learn.microsoft.com/en-us/do.net/core/extensions/windows-service
I was missing some of the nuget packages and other hand edits to the csproj file.我丢失了一些 nuget 包和对 csproj 文件的其他手动编辑。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.