2020
11-06
11-06
.NET Core使用Topshelf方式创建Windows服务的全过程记录
前言Topshelf是一个.NETStandard库,它消除了在.NETFramework和.NETCore中创建Windows服务的那些麻烦。安装Install-PackageTopshelf代码usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingTopshelf;namespaceConsoleApp2222{publicclassLoggingService:ServiceControl{privatevoidLog(stringlogMessage){Console.WriteLine(logMessage);}publicboolStart(HostControlhostContro...
继续阅读 >