Protoc C#Google Assistant .proto“未找到或有错误"; [英] Protoc C# Google Assistant .proto "Was Not Found Or Has Errors"

查看:397
本文介绍了Protoc C#Google Assistant .proto“未找到或有错误";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用gRPC与Google Assistant SDK进行通信.我下载了Embedded_assistant.proto并在CMD中运行以下命令:

I want to communicate with the Google Assistant SDK using gRPC. I downloaded the embedded_assistant.proto and ran this command in CMD:

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"

然后它给了我这些错误:

It then gave me these errors:

google/api/annotations.proto:找不到文件. google/rpc/status.proto:找不到文件. Embedded_assistant.proto:找不到导入的"google/api/annotations.proto"或出现错误. Embedded_assistant.proto:找不到导入的"google/rpc/status.proto"或有错误. Embedded_assistant.proto:270:5:"google.rpc.Status"未定义.

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.

How can I fix this? I used this proto compiler: https://github.com/google/protobuf/releases and at the bottom where it says protoc-3.3.0-win32.zip.

推荐答案

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

  • google/rpc/status.proto
  • google/api/annotations.proto

这篇关于Protoc C#Google Assistant .proto“未找到或有错误";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆