【发布时间】:2017-12-13 15:37:48
【问题描述】:
我使用我创建的项目使用 Protoc 工具版本 1.7.2 构建了一些协议缓冲区,遵循此处的教程: https://grpc.io/docs/quickstart/csharp.html#update-and-run-the-application
从 .proto 文件生成的代码吐出了这一行: 新 pbr::FileDescriptor[] { global::Google.Api.AnnotationsReflection.Descriptor, },
我已尝试将所有 nuget 依赖项更新到 1.8.0。仍然缺少这个库。该术语过于笼统,无法通过网络搜索找到任何有用的内容。
我需要包含哪些内容才能使其正常工作?
【问题讨论】:
-
这个问题实际上与 gRPC 无关。看起来您的一些 .proto 文件正在导入“google/api/annotations.proto”(并且在编译 annotations.proto 时生成了 Google.Api.AnnotationsReflection.Descriptor 的描述符 - 你有 1.)忘记生成annotations.proto 的代码 2.) 没有在您的项目中包含为 annotations.proto 生成的 c# 文件?
标签: c# protocol-buffers grpc