zondag 1 mei 2022

create windows service with .net core

Build a windows service on windows server you need to compile the assemblies with win-x64 runtime

dotnet build -c Release --runtime win-x64 --no-self-contained

dotnet publish-c Release --runtime win-x64 --no-self-contained


use sc.exe util to install the windows service

sc.exe create "ServiceName" binpath="Dir\Service.exe"


info:

sc.exe create | Microsoft Docs

Geen opmerkingen:

Een reactie posten