Google Protobuf 编译

Google Protobuff compiling

我正在尝试让我的 Web API 与 Google Protobuff 一起工作,我尝试按照 Github 中的说明进行操作,但我找不到如何编译 protobuff 文件的方法,所以它将为我的项目创建 c# 文件。有人可以告诉我相关说明以便执行此操作吗?

提前谢谢大家。

假设 "protobuff file" 你的意思是一个 .proto 文件,你正在寻找的工具是 protoc,它 ships in the release.

或者,protocprotogen 都可以在 https://protogen.marcgravell.com 上在线使用 - protogen 是 protobuf-net 的等效工具,用于独立的重新实现。

可能还有 MSBuild/CLI 工具可以通过 protobuf nuget 包单独使用,我不确定。