Grpc.AspNetCore.Server 2.49.0

.NET 5.0 .NET Core 3.0
NuGet\Install-Package Grpc.AspNetCore.Server -Version 2.49.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package Grpc.AspNetCore.Server --version 2.49.0
<PackageReference Include="Grpc.AspNetCore.Server" Version="2.49.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Grpc.AspNetCore.Server --version 2.49.0
#r "nuget: Grpc.AspNetCore.Server, 2.49.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Grpc.AspNetCore.Server as a Cake Addin
#addin nuget:?package=Grpc.AspNetCore.Server&version=2.49.0

// Install Grpc.AspNetCore.Server as a Cake Tool
#tool nuget:?package=Grpc.AspNetCore.Server&version=2.49.0

Grpc.AspNetCore.Server

Grpc.AspNetCore.Server is a gRPC server library for .NET.

Configure gRPC

In Startup.cs:

  • gRPC is enabled with the AddGrpc method.
  • Each gRPC service is added to the routing pipeline through the MapGrpcService method. For information about how to create gRPC services, see Create gRPC services and methods.
public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddGrpc();
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }

        app.UseRouting();

        app.UseEndpoints(endpoints =>
        {
            endpoints.MapGrpcService<GreeterService>();
        });
    }
}

ASP.NET Core middleware and features share the routing pipeline, therefore an app can be configured to serve additional request handlers. The additional request handlers, such as MVC controllers, work in parallel with the configured gRPC services.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0
.NET Core netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (68)

Showing the top 5 NuGet packages that depend on Grpc.AspNetCore.Server:

Package Downloads
Grpc.AspNetCore.Server.ClientFactory The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

HttpClientFactory integration the for gRPC .NET client when running in ASP.NET Core

Grpc.AspNetCore.Server.Reflection The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Automatic discovery of services for Grpc.Reflection

protobuf-net.Grpc.AspNetCore The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

prometheus-net.AspNetCore.Grpc The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

ASP.NET Core gRPC integration with Prometheus

protobuf-net.Grpc.AspNetCore.Reflection The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

GitHub repositories (19)

Showing the top 5 popular GitHub repositories that depend on Grpc.AspNetCore.Server:

Repository Stars
dotnet-architecture/eShopOnContainers
Cross-platform .NET sample microservices and container based application that runs on Linux Windows and macOS. Powered by .NET 6, Docker Containers and Azure Kubernetes Services. Supports Visual Studio, VS for Mac and CLI based environments with Docker CLI, dotnet CLI, VS Code or any other code editor.
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 2.1, 2.2, 3.1, 5.0, 6.0 and 7.0 projects you can use. Readme contains explanations on all projects.
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
grpc/grpc-dotnet
gRPC for .NET
Cysharp/MagicOnion
Unified Realtime/API framework for .NET platform and Unity.
Version Downloads Last updated
2.49.0 7,601 9/26/2022
2.49.0-pre1 1,215 9/1/2022
2.48.0 200,806 8/24/2022
2.48.0-pre1 1,354 8/17/2022
2.47.0 428,770 7/3/2022
2.47.0-pre1 1,789 6/23/2022
2.46.0 913,185 5/13/2022
2.46.0-pre1 1,757 4/28/2022
2.45.0 559,891 4/19/2022
2.45.0-pre1 2,591 4/7/2022
2.44.0 638,636 3/17/2022
2.44.0-pre1 9,025 3/9/2022
2.43.0 424,123 2/25/2022
2.43.0-pre1 7,295 1/28/2022
2.42.0 921,267 1/19/2022
2.42.0-pre1 6,819 12/30/2021
2.41.0 859,062 12/7/2021
2.41.0-pre1 16,217 11/12/2021
2.40.0 1,669,424 10/5/2021
2.40.0-pre1 4,586 9/9/2021
2.39.0 927,693 8/18/2021
2.39.0-pre1 3,649 8/6/2021
2.38.0 1,440,453 6/11/2021
2.38.0-pre1 657 6/4/2021
2.37.0 1,046,092 4/20/2021
2.37.0-pre1 408 4/14/2021
2.36.0 1,283,363 3/17/2021
2.36.0-pre1 1,734 3/9/2021
2.35.0 620,922 2/4/2021
2.35.0-pre1 1,497 1/26/2021
2.34.0 1,733,616 12/11/2020
2.34.0-pre1 2,843 12/1/2020
2.33.1 1,091,164 10/28/2020
2.33.1-pre1 724 10/22/2020
2.32.0 792,007 10/5/2020
2.32.0-pre1 12,912 9/8/2020
2.31.0 529,584 8/14/2020
2.31.0-pre2 920 8/3/2020
2.30.0 352,894 7/16/2020
2.30.0-pre1 11,857 6/17/2020
2.29.0 686,287 5/27/2020
2.29.0-pre1 2,541 5/15/2020
2.28.0 1,274,789 4/9/2020
2.28.0-pre2 20,644 3/11/2020
2.28.0-pre1 5,919 3/3/2020
2.27.0 1,356,830 2/7/2020
2.27.0-pre1 7,394 1/24/2020
2.26.0 352,667 12/19/2019
2.26.0-pre1 716 12/10/2019
2.25.0 1,030,751 11/7/2019
2.25.0-pre1 690 11/1/2019
2.24.0 273,705 10/21/2019
2.24.0-pre1 1,404 10/9/2019
2.23.2 215,082 9/20/2019
0.2.23-pre2 9,808 9/6/2019
0.2.23-pre1 6,559 8/21/2019
0.1.22-pre3 7,645 7/30/2019
0.1.22-pre2 11,824 7/2/2019
0.1.22-pre1 5,155 6/17/2019
0.1.21-pre1 13,177 6/4/2019
0.1.20-pre1 10,605 4/9/2019
0.1.19-pre1 4,790 2/21/2019