3、利用工具生成代码 在解决方案的packages目录下找到Grpc.Tools.2.31.0\tools\windows_x86目录,下面有2个文件grpc_csharp_plugin.exe和protoc.exe。 将python下的helloworld.proto文件复制到目录下,然后运行: protoc -I . --csharp_out . --grpc_out . --plugin=protoc-gen-grpc=grpc_csharp_plugin.exe Hel...
编译proto文件 在项目packages文件夹(*\packages\grpc.tools\2.25.0-pre1\tools\windows_x64)下找到protoc.exe和grpc_csharp_plugin.exe(如果项目文件夹下没有packages就新建,并将上面找到的.nuget\packages中的“Google.protobuf”、“grpc”、“grpc.tools”文件夹拷贝到我们工程文件夹下的packages里面)。 在dos...
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 grpc_php_plugin.exe grpc_python_plugin.exe grpc_ruby_plugin.exe java和go有...
tools\protoc.exe -I protos --csharp_outoutHelloGrpc.proto --plugin=protoc-gen-grpc=tools\grpc_csharp_plugin.exe//-I 工作目录//--grpc_out 第一个参数是表示输出文件目录 第二个参数表示 描述文件名称(protobuf文件)//--csharp_out 和grpc_out 参数相同//--plugin= 表示输出c#的插件tools\protoc....
其中:grpc_cpp_plugin.exe及grpc_csharp_plugin.exe所在路径替换为您安装的路径。 此时整个解决方案的目录结构如下: 6、生成CPPServer项目 拷贝grpc源码目录下examples\cpp\helloworld\http://greeter_server.cc到CPPServer目录下,并将文件helloworld.grpc.pb.h、helloworld.pb.h、http://greeter_server.cc、http://...
(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....
exe --grpc_out: protoc-gen-grpc: 系统找不到指定的文件。 --grpc_out:csharp_out是输出类似于咱们平时写的实体类,接口,定义之类的。生成的文件叫,额,就叫*.cs吧.grpc_out是跟服务相关,创建,调用,绑定,实现相关。生成的玩意叫xxxGrpc.cs。 --plugin=protoc-gen-grpc=grpc_csharp_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文件 ...
如果需要同时编译服务端和客户端代码,需要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...