缺少 googleapis/google/protobuf
Missing googleapis/google/protobuf
我正在尝试从 .proto 文件 here. The protobuf compiler works, except that it is missing dependencies from the googleapis/google/protobuf directory. All of the other import files that it depends on exist, here 为 GoogleCloudSpeechToTextv1p1beta1 编译 C# 库。
我的问题是:为什么 googleapis/google directory 中缺少 protobuf 目录?它是我个人 compile/assemble 需要的图书馆吗?或者它是 Google 应该提供的东西,但它只是丢失了?
google/protobuf
目录随 Google.Protobuf.Tools
软件包一起提供,位于 tools
下(例如 tools/google/protobuf/any.proto
)。或者,相同的文件位于 protobuf GitHub repo 中(在 src
下 - 原型与 C++ 代码混合)。
因此,如果需要,您应该将 tools
目录作为 "root" 包含在 protoc
调用中...但是在这种特殊情况下,已经有一个 NuGet package of Google.Cloud.Speech.V1P1Beta1 so I'd suggest you use that instead :) (There are even docs available 如果您知道从其他 API 推断 URL 方案。它并不是真正的广告。)
我正在尝试从 .proto 文件 here. The protobuf compiler works, except that it is missing dependencies from the googleapis/google/protobuf directory. All of the other import files that it depends on exist, here 为 GoogleCloudSpeechToTextv1p1beta1 编译 C# 库。
我的问题是:为什么 googleapis/google directory 中缺少 protobuf 目录?它是我个人 compile/assemble 需要的图书馆吗?或者它是 Google 应该提供的东西,但它只是丢失了?
google/protobuf
目录随 Google.Protobuf.Tools
软件包一起提供,位于 tools
下(例如 tools/google/protobuf/any.proto
)。或者,相同的文件位于 protobuf GitHub repo 中(在 src
下 - 原型与 C++ 代码混合)。
因此,如果需要,您应该将 tools
目录作为 "root" 包含在 protoc
调用中...但是在这种特殊情况下,已经有一个 NuGet package of Google.Cloud.Speech.V1P1Beta1 so I'd suggest you use that instead :) (There are even docs available 如果您知道从其他 API 推断 URL 方案。它并不是真正的广告。)