Protoc C# Google 助手 .proto "Was Not Found Or Has Errors"

Protoc C# Google Assistant .proto "Was Not Found Or Has Errors"

我想使用 gRPC 与 Google Assistant SDK 通信。我在 CMD 中下载了 embedded_assistant.proto 和 运行 这个命令:

protoc -I=I:"\PC Folders\Downloads\proto3.3.0win32\bin" --csharp_out=$DST_DIR "I:\PC Folders\Downloads\proto3.3.0win32\bin\embedded_assistant.proto"

然后它给了我这些错误:

google/api/annotations.proto: File not found. google/rpc/status.proto: File not found. embedded_assistant.proto: Import "google/api/annotations.proto" was not found or had errors. embedded_assistant.proto: Import "google/rpc/status.proto" was not found or had errors. embedded_assistant.proto:270:5: "google.rpc.Status" is not defined.

我该如何解决这个问题?我使用了这个原型编译器:https://github.com/google/protobuf/releases 并在底部显示 protoc-3.3.0-win32.zip.

您可以从 googleapis/googleapis 存储库中获取这些文件: