Example of making windows services on .net core platform
Build the program by Build->PublishSelectedContent
Make sure the target runtime is win-x64 otherwise the publish will fail
Run the following code to create service
sc create {ServiceName} binpath= "{exepath}" start= auto
Note: ServiceName must be the same as the value in Program.cs
then you can start your service in taskmgr