我正在关注gRPC 的C# 快速入门教程。我已经到了这一步,我必须使用以下命令来生成 gRPC 代码:
%UserProfile%\.nuget\packages\Grpc.Tools.1.15.0\tools\windows_x86\protoc.exe -I../../protos --csharp_out Greeter --grpc_out Greeter ../../protos/helloworld.proto --plugin=protoc-gen-grpc=%UserProfile%\.nuget\packages\packages\Grpc.Tools.1.15.0\tools\windows_x86\grpc_csharp_plugin.exe
Run Code Online (Sandbox Code Playgroud)
它不起作用,运行上面的命令后我在终端中得到的是这样的:
--grpc_out: protoc-gen-grpc: 系统找不到指定的路径。
我不知道为什么系统找不到路径,因为我已经更改了命令中的路径,使其指向需要执行的文件。