(1)首先,系统里找到protoc.exe和grpc_csharp_plugin.exe(位置多半会在C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64 ,如果不在可以用everything搜索前面的工具名) (2)然后在自己的VS工程文件夹中建立一个新文件夹命名为packages , 并将上面找到的.nuget\packages中的“Google....
cd/d%~dp0setTOOLS_PATH=C:\Users\Freeman\.nuget\packages\Grpc.Tools\1.0.0\tools\windows_x86%TOOLS_PATH%\protoc.exe^--proto_path protos^--cpp_out=Interfaces/cpp^--csharp_out=Interfaces/csharp^--java_out=Interfaces/java^--js_out=Interfaces/javascript^--grpc_out=Interfaces/csharp^--plug...
这里使用gRPC定义的protoc的C#插件grpc_csharp_plugin.exe,而不是使用protoGen.exe。 将以下几个文件放在同一个文件夹中: grpc_csharp_plugin.exe helloworld.proto protoc.exe 创建一个bat文件,编写如下命令行: protoc.exe -I=.--csharp_out=. --grpc_out=. --plugin=protoc-gen-grpc=grpc_csharp_plugin....
生成或获取protoc和grpc_csharp_plugin本机二进制文件,并配置Grpc.Tools以使用它们。 通过设置以下环境变量来配置本机二进制文件: PROTOBUF_PROTOC- 协议缓冲区编译器的完整路径 GRPC_PROTOC_PLUGIN- grpc_csharp_plugin 的完整路径 对于Alpine Linux,https://pkgs.alpinelinux.org/上有社区提供的用于协议缓冲区编译...
(1)首先,系统里找到protoc.exe和grpc_csharp_plugin.exe(位置多半会在C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64 ,如果不在可以用everything搜索前面的工具名) (2)然后在自己的VS工程文件夹中建立一个新文件夹命名为packages , 并将上面找到的.nuget\packages中的“Google....
/// Base class for server-side implementations of PlatformGrpc [grpc::BindServiceMethod(typeof(PlatformGrpc), "BindService")] public abstract partial class PlatformGrpcBase { [global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)] public virtual global::System.Threading.Tasks....
会在 /usr/local/bin 目录下生成以下文件 #grpc_cpp_plugin #grpc_csharp_plugin #grpc_node_plugin #grpc_objective_c_plugin #grpc_php_plugin #grpc_python_plugin #grpc_ruby_plugin # 或者只变编译grpc_php_plugin > make grpc_php_plugin Package libcares was not found in the pkg-config search ...
先用Grpc.Tools 下的,如果生成不了,再用Grpc.Tools下的 grpc_csharp_plugin.exe, Google.Protobuf.Tools下protoc.exe 然后在项目中新建一个名为ProtocGenerate.cmd的文件,在其中输入以下指令: protoc -I . --csharp_out . --grpc_out . --plugin=protoc-gen-grpc=grpc_csharp_plugin.exe msg.proto ...
grpc_csharp_plugin grpc_node_plugin grpc_objective_c_plugin grpc_php_plugin grpc_python_plugin grpc_ruby_plugin 这些工具作为插件供proto编译器使用。需要先下载grpc/grpcgithub上的源码。 git clone -b $(curl -L https://grpc.io/release) https://github.com/grpc/grpc ...
protocとgrpc_csharp_pluginのネイティブ バイナリをビルドするか入手し、それらを使うようにGrpc.Toolsを構成します。 次の環境変数を設定してネイティブ バイナリを構成します。 PROTOBUF_PROTOC- プロトコル バッファー コンパイラの完全なパス ...