Hi Sir ,
Is there anyway to connect c# client app connect to C++ grpc server ?

On Tuesday, February 16, 2021 at 10:32:55 PM UTC+5:30 Luke S wrote:

> Let me know if any further information is required, we are still curious 
> about the answer! 
>
> On Monday, February 8, 2021 at 11:26:12 AM UTC-6 Luke S wrote:
>
>> Thanks for your reply Jan, my apologies I should have been more specific 
>> in what our issue was. Specifically, our current generations of service 
>> objects from our protos yields C# code that utilizes the Channel class 
>> <https://grpc.github.io/grpc/csharp/api/Grpc.Core.Channel.html>, whereas 
>> their C# compiler with the new native .NET gRPC implementation is expecting 
>> services to be implemented with the ChannelBase class 
>> <https://grpc.github.io/grpc/csharp-dotnet/api/Grpc.Core.ChannelBase.html>. 
>> When we update our protoc version to 3.13.0 we can see the generated 
>> implementations utilize ChannelBase where before they use Channel. As far 
>> as I understand it from our client, the Channel class no longer exists in 
>> the .NET gRPC implementation they are using. Below is an example of our 
>> generated code difference.
>>
>> How our code currently generates one of our services:
>>
>> public ServiceManagerClient(grpc::Channel channel) : base(channel)
>> {
>> }
>>
>> When we use protoc 3.13.0:
>>
>> public SystemConfigClient(grpc::ChannelBase channel) : base(channel)
>> {
>> }
>>
>> Let me know if this is not clear or if you need more information.
>>
>> On Monday, February 8, 2021 at 9:43:13 AM UTC-6 Jan Tattermusch wrote:
>>
>>> The protobuf C# library has always worked just fine with the grpc-dotnet 
>>> implementation. We've made some changes in the generated code over time, 
>>> but even the ancient versions of the generated code should just work with 
>>> grpc-dotnet.
>>>
>>> In gRPC C# (not the codegen) we've made some changes to enable the 
>>> grpc-dotnet functionality. Your best best is to look a the version of 
>>> Grpc.Core.Api and Google.Protobuf that's being included by the early 
>>> versions of grpc-dotnet and you can be sure that those work just fine - 
>>> e.g the first stable version of Grpc.AspNetCore.Server is using 
>>> Grpc.Core.Api 2.23.0 (but yeah the prereleases before that also worked just 
>>> fine).
>>>
>>> Btw, when you don't specify what broke on your end, it's kind of 
>>> impossible to tell what change could have caused it.
>>>
>>> On Wednesday, February 3, 2021 at 5:14:54 PM UTC+1 Luke S wrote:
>>>
>>>> I am currently working as a developer for a C++ gRPC Server project, 
>>>> and one of my server clients is using C# to interact with our server. 
>>>> Their 
>>>> client code currently utilizes the older gRPC C# library 
>>>> <https://github.com/grpc/grpc/tree/master/src/csharp> but they have a 
>>>> need to move to the more modern modern gRPC C# .NET framework 
>>>> <https://github.com/grpc/grpc-dotnet>. They noted that when they 
>>>> attempted to switch over to this more modern framework, their client code 
>>>> no longer compiled due to compilation issues in the C# proto wrapper files 
>>>> we generated for them.
>>>>
>>>> The issue clearly seems to stem from the version of 
>>>> protoc.exe/grpc_csharp_plugin.exe we are using. Currently, the C++ install 
>>>> of gRPC that we have comes with version 3.5.0 of protoc.exe. When our 
>>>> client did the NuGet C# .NET install of gRPC, they were provided with a 
>>>> protoc.exe version of 3.13.0, which we took from them (along with their 
>>>> installed grpc_csharp_plugin.exe file). We used these two files, and these 
>>>> alone, to replace our existing exes at C:\Program Files\grpc\bin and 
>>>> noticed that, without any other changes, all of our C# files generated 
>>>> from 
>>>> proto, had different outputs. When we sent these newly generated files to 
>>>> our client, their project was able to properly compile with them where it 
>>>> could not before.
>>>>
>>>> Clearly a change was made between version 3.5.0 and 3.13.0 of protoc 
>>>> (and maybe also grpc_csharp_plugin) where file generations of C# files 
>>>> became compatible with your .NET framework. At what version did this 
>>>> occur? 
>>>> What is the earliest possible version of your C++ gRPC library that I can 
>>>> install to obtain the version of protoc/plugin to enable me to generate 
>>>> these more modern files for our clients?
>>>>
>>>> Your help is greatly appreciated!
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/202ac359-d467-4f85-8e90-9b0cc1e3b2fcn%40googlegroups.com.

Reply via email to