Grpc.Core已更新为2.23,System.MissingMethodException:找不到方法:无效Grpc.Core.ClientBase`1..ctor(Grpc.Core.Channel)

时间:2019-10-07 12:46:53

标签: c# .net grpc

Grpc.Core更新为2.23后

未找到方法:“无效Grpc.Core.ClientBase`1..ctor(Grpc.Core.Channel)”

public MyClient(IConfiguration config, ILogger<MyClient> logger)
{
    var thisConfig = config.GetGRPCConfigObject();
    var channel = new Channel($"{thisConfig.HostName}:{thisConfig.Port}", ChannelCredentials.Insecure);
    this.Client = new MyPackage.ServiceClient(channel); // exception here
    this.Logger = logger;
}

如何在2.23中构建ServiceClient?

1 个答案:

答案 0 :(得分:0)

已解决的问题更新 Grpc.Core和Grpc.Tools 到版本 2.24