3
Visual Studio 2015
C#
NuGet Packages :
Google.Protobuf v3.0.0
Google.Protobuf.Tools v3.0.0
消息类型Quake
在c#visual studio中编译协议缓冲区3时间戳记类型?
syntax = "proto3";
import "google/protobuf/timestamp.proto";
message Quake {
google.protobuf.Timestamp _timestamp = 1;
double magnitude = 2;
}
timestamp.proto
包含在同一个文件夹
protoc 3.0.2
命令行编译成功
但是VS右键单击原文件,然后选择“运行自定义工具”失败,错误“自定义工具'ProtoBufTool'失败。”
从Visual Studio中生成C#类?
感谢里克但我的问题是运行在VS C#编译器通过的NuGet包integraton – BaltoStar
你有没有解决过这个问题。我正在使用安装的Google.Protobuf和Google.Protobuf.Tools NuGet包。但是这些软件包不包含任何.proto文件。如果我从这些包中使用protoc,我是否需要访问timestamp.proto文件或者编译器是否知道这个问题? –