How can I complile Grpc.Core.dll form https://github.com/grpc/grpc for c# Visual Studio solution

90 views Asked by At

I'm implementing Grpc server using Visual Studio C#. Client-side implemented on Android and IoS using chromium.
We need to get HTTP3 QUIC connection.
After investigations and testing we found that gRPC server closes connection after handshake because client don't send "ALPN property".
I modified gRPC core to disable ALPN check, as per the following:

https://github.com/grpc/grpc/issues/29331
https://github.com/grpc/grpc/issues/23172

by changing

#define TSI_OPENSSL_ALPN_SUPPORT 0

I have 3 questions:

  1. How do I link gRPC libraries that I build (as per cmake) into Visual Studio C# solution .
  2. May be somebody knows, how to turn off (ALPN) check without changing gRPC core?
  3. Any other options to build c++ Grpc.Core library to integrate with Visual Studio C# solution?

Any help will be appreciated. Thank's

1

There are 1 answers

1
chuchu42 On

From the project documentation here:

When using the "Visual Studio" generator, cmake will generate a solution (grpc.sln) that contains a VS project for every target defined in CMakeLists.txt (+ a few extra convenience projects added automatically by cmake). After opening the solution with Visual Studio you will be able to browse and build the code.

Run from grpc directory after cloning the repo with --recursive or updating submodules.

md .build
cd .build
cmake .. -G "Visual Studio 14 2015"
cmake --build . --config Release