Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

189
Vistas
migrating from grpc.core to grpc-dotnet

We want to migrate our project from grpc.core to gprc-dotnet. In my grpc server I reference the packages Grpc.AspNetCore. The proto file is compiled in a different project and shared. When I implement my server method like:

**using Grpc.Core;**
using Sample.Shared;

namespace Sample.GrpcServer.Services;

public class CustomerService : CustomerGrpcService.CustomerGrpcServiceBase
{
    private readonly ILogger<CustomerService> _logger;
    public CustomerService(ILogger<CustomerService> logger)
    {
        _logger = logger;
    }

    public override Task<CustomerListResponse> GetCustomerList(CustomerListRequest request, ServerCallContext context)
    {
       ...
    }

The ServerCallContext class requires me to import Grpc.Core which I want to remove. How am I supposed to use grpc-dotnet to implement my overrides eg the ServerCallContext class?

It looks like ServerCallContext is implemented in the package Grpc.Core.Api which contains the namespace Grpc.Core. This is a little confusing but was probably implemented for backward compatibiliy. Perhaps somebody can comment on that. So the only thing really to do in this scenario is to use the correct nuget package Grpc.AspNetCore.Server. References to Grpc.Core will be pulled from this and underlying referenced assembly.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Grpc.AspNetCore packages contains a namespace Grpc.Core with classes like ServerCallContext that also were in the deprecated Grpc.Core package.

We removed the references to the deprecated packages Grpc.Core and also removed references to Google.Protobuf and Grpc.Tools since they are included in Grpc.AspNetCore package.

This link provides additional information on grpc migration: https://docs.microsoft.com/en-us/aspnet/core/grpc/migration?view=aspnetcore-6.0

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda