This content has 4 years. Some of the information in this post may be out of date or no longer work. Please, read this page keeping its age in your mind.You may want to host your .NET Core application in a Windows computer, even a Windows server. You want to get rid of Console windows, and do not want to start the app manually after the computer is started, or restart it when the application has crashed. This tutorial helps you to make a windows service from your .NET Core application, especially a .NET Core WebAPI. Install the “Microsoft.Extensions.Hosting.WindowsServices” NuGet package for you .NET Core application. This can be achieved from NuGet package manager console: Make changes in your Program.cs file. Add the UseWindowsService call to the CreateHostBuilder function. The result may look something like this: This is all of the code change you need to do. Let’s Publish your application. Make the following changes in the following dialog by pressing an edit button next to a summary label. Click on Publish. Once the publish is done, copy the published files to a specific directory of the computer, or an another computer. Run the powershell script above, to create a new windows service on the hosting computer. Do NOT forget to set the inbound policies for your application in Advanced Windows Firewall. Also keep in mind, if you want to access your web application outside of your local network, you need to forward ports on your router.