A small example of a generic host based .NET core app which can be run as a Windows Service.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
IHostedServiceAsAService Remove unneeded dependency Aug 15, 2018
.gitattributes Initial commit Aug 11, 2018
.gitignore Initial commit Aug 11, 2018
IHostedServiceAsAService.sln Initial commit Aug 11, 2018
README.md Fixing readme Aug 22, 2018

README.md

IHostedServiceAsAService

A small example of a generic host based .NET core app which can be run as a Windows Service.

Building and creating a service

Build and publish

dotnet publish --configuration Release

Define the service

sc create MyFileService binPath= "E:\Projects\IHostedServiceAsAService\IHostedServiceAsAService\bin\Release\netcoreapp2.1\win7-x64\publish\IHostedServiceAsAService.exe"

Start the service

sc start MyService

For further details see my blog post Running a .NET Core Generic Host App as a Windows Service