Grpc.AspNetCore.Server 2.51.0

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
.NET 5.0 .NET Core 3.0
dotnet add package Grpc.AspNetCore.Server --version 2.51.0
NuGet\Install-Package Grpc.AspNetCore.Server -Version 2.51.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.
<PackageReference Include="Grpc.AspNetCore.Server" Version="2.51.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.51.0
#r "nuget: Grpc.AspNetCore.Server, 2.51.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.51.0

// Install Grpc.AspNetCore.Server as a Cake Tool
#tool nuget:?package=Grpc.AspNetCore.Server&version=2.51.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 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.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 (79)

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

Pulumi

The Pulumi .NET SDK lets you write cloud programs in C#, F#, and VB.NET.

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

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 7, 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.51.0 260,794 1/2/2023
2.51.0-pre1 3,944 12/7/2022
2.50.0 413,503 11/17/2022
2.50.0-pre1 5,402 11/3/2022
2.49.0 1,094,861 9/26/2022
2.49.0-pre1 4,109 9/1/2022
2.48.0 629,742 8/24/2022
2.48.0-pre1 1,901 8/17/2022
2.47.0 867,240 7/3/2022
2.47.0-pre1 2,322 6/23/2022
2.46.0 1,448,036 5/13/2022
2.46.0-pre1 2,076 4/28/2022
2.45.0 870,891 4/19/2022
2.45.0-pre1 3,143 4/7/2022
2.44.0 976,163 3/17/2022
2.44.0-pre1 17,340 3/9/2022
2.43.0 536,381 2/25/2022
2.43.0-pre1 8,537 1/28/2022
2.42.0 1,273,455 1/19/2022
2.42.0-pre1 7,452 12/30/2021
2.41.0 1,053,962 12/7/2021
2.41.0-pre1 16,668 11/12/2021
2.40.0 2,466,075 10/5/2021
2.40.0-pre1 4,791 9/9/2021
2.39.0 1,113,979 8/18/2021
2.39.0-pre1 4,088 8/6/2021
2.38.0 1,591,283 6/11/2021
2.38.0-pre1 683 6/4/2021
2.37.0 1,227,499 4/20/2021
2.37.0-pre1 424 4/14/2021
2.36.0 1,610,381 3/17/2021
2.36.0-pre1 1,852 3/9/2021
2.35.0 679,990 2/4/2021
2.35.0-pre1 1,572 1/26/2021
2.34.0 1,994,999 12/11/2020
2.34.0-pre1 2,956 12/1/2020
2.33.1 1,279,011 10/28/2020
2.33.1-pre1 741 10/22/2020
2.32.0 913,563 10/5/2020
2.32.0-pre1 12,945 9/8/2020
2.31.0 555,291 8/14/2020
2.31.0-pre2 953 8/3/2020
2.30.0 381,149 7/16/2020
2.30.0-pre1 11,896 6/17/2020
2.29.0 739,408 5/27/2020
2.29.0-pre1 2,844 5/15/2020
2.28.0 1,585,646 4/9/2020
2.28.0-pre2 20,798 3/11/2020
2.28.0-pre1 5,991 3/3/2020
2.27.0 1,426,384 2/7/2020
2.27.0-pre1 7,651 1/24/2020
2.26.0 360,316 12/19/2019
2.26.0-pre1 733 12/10/2019
2.25.0 1,037,244 11/7/2019
2.25.0-pre1 706 11/1/2019
2.24.0 292,545 10/21/2019
2.24.0-pre1 1,419 10/9/2019
2.23.2 226,022 9/20/2019
0.2.23-pre2 9,883 9/6/2019
0.2.23-pre1 6,922 8/21/2019
0.1.22-pre3 7,678 7/30/2019
0.1.22-pre2 12,148 7/2/2019
0.1.22-pre1 5,242 6/17/2019
0.1.21-pre1 13,288 6/4/2019
0.1.20-pre1 10,646 4/9/2019
0.1.19-pre1 4,870 2/21/2019