How to Publish .NET Core gRPC Server as a Windows Service

Mert Ilis
3 min readMar 6, 2020

In this post I’ll show you how to publish a ASPNET.Core gRPC server to a Windows 2019 Server as a windows service.

gRPC is a high performance remote procedure call framework. With gRPC you can create real time services which can stream requests and responses. Since the release of .NET Core version 3.0 you can find a gRPC Service project template in Visual Studio 2019.

During development you can easily test and debug your gRPC server on your development machine without any configurations. You can also publish your gRPC service as a windows service by performing following steps.

To enable running your server project as windows service you need to first add “Microsoft.Extensions.Hosting.WindowsServices” NuGet package to your project.

Moreover, add “UseWindowsService()” statement to the Host.CreateDefaultBuilder configuration in Program.cs:

--

--

Mert Ilis
Mert Ilis

Written by Mert Ilis

I’m a software development enthusiast who likes trying different web technologies and adding value to his team.

Responses (1)