Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!