Creating a Windows Service in Net Core 2.1 using HTTP CLIENT and Integration
Install-Package Microsoft.Windows.Compatibility
dotnet publish -r win-x64 -c Release
or
dotnet publish -r win-x86 -c Release
sc create TestService BinPath=C:\full\path\to\publish\dir\WindowsServiceExample.exe