打开命令行终端进入pb文件夹,执行以下命令生成c++文件及c#文件。 其中:grpc_cpp_plugin.exe及grpc_csharp_plugin.exe所在路径替换为您安装的路径。 此时整个解决方案的目录结构如下: 6、生成CPPServer项目 拷贝grpc源码目录下examples\cpp\helloworld\http://greeter_server.cc到CPPServer目录下,并将文件helloworld.grpc....
(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....
message HelloRequest {stringname =1; } message HelloReply {stringmessage =1; } 服务端生成 .proto 代码为 C# NutGet Install-Package Grpc.Tools 找到tools 从里面选择自己电脑的版本 把protoc.exe 、 grpc_csharp_plugin.exe 复制出来和 .proto 文件放在一起 编写一个 .cmd 文件和 .proto 文件放在一起...
这里使用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....
先用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 ...
LIBCMT.LIB是MT版本的c运行库 MSVCRT.LIB是MD版本的c运行库 LIBCMTD.LIB是MTD版本的c运行库 MSVCRTD.LIB是MDD版本的c运行库 然后最后需要的bin和lib大概有 bin grpc_cpp_plugin.exe grpc_csharp_plugin.exe grpc_node_plugin.exe grpc_objective_c_plugin.exe ...
protoc.exe grpc_csharp_plugin.exe 将proto文件放入Editor文件夹下,新建一个bat文件 set PJ_PATH=E:/PJ/IOGame1/Assets//路径引用 %PJ_PATH%/10_Plugins\Editor\grpc\protoc.exe// protoc路径 %PJ_PATH%/10_Plugins\Editor\grpc\ProtoFile\client.proto//proto文件 ...
exe --grpc_out: protoc-gen-grpc: 系统找不到指定的文件。 --grpc_out:csharp_out是输出类似于咱们平时写的实体类,接口,定义之类的。生成的文件叫,额,就叫*.cs吧.grpc_out是跟服务相关,创建,调用,绑定,实现相关。生成的玩意叫xxxGrpc.cs。 --plugin=protoc-gen-grpc=grpc_csharp_plugin.exe 这个就是...
如果需要同时编译服务端和客户端代码,需要grpc_csharp_plugin,可以在Grpc.Tools nuget包中找到: %UserProfile%.nuget\packages\Grpc.Tools\1.20.0\tools\windows_x64\grpc_csharp_plugin.exe set PLUGIN=%UserProfile%\.nuget\packages\Grpc.Tools\1.20.0\tools\windows_x64\grpc_csharp_plugin.exe ...
GrpcCSharpPluginExec: null GrpcProtocExec: null GrpcAdditionalArguments: null Additionally, you can specify multiple folders where the generated output should be copied to by setting the GrpcOutputFolderCopy property. This is useful for example when you have the proto files in the server project an...