protocol-buffers-3

compile protocol buffers 3 timestamp type in c# visual studio?

懵懂的女人 提交于 2021-01-27 10:02:56
问题 Visual Studio 2015 C# NuGet Packages : Google.Protobuf v3.0.0 Google.Protobuf.Tools v3.0.0 MessageType Quake syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Quake { google.protobuf.Timestamp _timestamp = 1; double magnitude = 2; } timestamp.proto included in same folder protoc 3.0.2 command-line compilation succeeds But VS right-click proto file and select "Run Custom Tool" fails with error "The custom tool 'ProtoBufTool' failed." to generate the C# classes from within

compile protocol buffers 3 timestamp type in c# visual studio?

江枫思渺然 提交于 2021-01-27 09:58:48
问题 Visual Studio 2015 C# NuGet Packages : Google.Protobuf v3.0.0 Google.Protobuf.Tools v3.0.0 MessageType Quake syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Quake { google.protobuf.Timestamp _timestamp = 1; double magnitude = 2; } timestamp.proto included in same folder protoc 3.0.2 command-line compilation succeeds But VS right-click proto file and select "Run Custom Tool" fails with error "The custom tool 'ProtoBufTool' failed." to generate the C# classes from within

compile protocol buffers 3 timestamp type in c# visual studio?

杀马特。学长 韩版系。学妹 提交于 2021-01-27 09:55:07
问题 Visual Studio 2015 C# NuGet Packages : Google.Protobuf v3.0.0 Google.Protobuf.Tools v3.0.0 MessageType Quake syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Quake { google.protobuf.Timestamp _timestamp = 1; double magnitude = 2; } timestamp.proto included in same folder protoc 3.0.2 command-line compilation succeeds But VS right-click proto file and select "Run Custom Tool" fails with error "The custom tool 'ProtoBufTool' failed." to generate the C# classes from within

compile protocol buffers 3 timestamp type in c# visual studio?

眉间皱痕 提交于 2021-01-27 09:55:06
问题 Visual Studio 2015 C# NuGet Packages : Google.Protobuf v3.0.0 Google.Protobuf.Tools v3.0.0 MessageType Quake syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Quake { google.protobuf.Timestamp _timestamp = 1; double magnitude = 2; } timestamp.proto included in same folder protoc 3.0.2 command-line compilation succeeds But VS right-click proto file and select "Run Custom Tool" fails with error "The custom tool 'ProtoBufTool' failed." to generate the C# classes from within

compile protocol buffers 3 timestamp type in c# visual studio?

允我心安 提交于 2021-01-27 09:54:31
问题 Visual Studio 2015 C# NuGet Packages : Google.Protobuf v3.0.0 Google.Protobuf.Tools v3.0.0 MessageType Quake syntax = "proto3"; import "google/protobuf/timestamp.proto"; message Quake { google.protobuf.Timestamp _timestamp = 1; double magnitude = 2; } timestamp.proto included in same folder protoc 3.0.2 command-line compilation succeeds But VS right-click proto file and select "Run Custom Tool" fails with error "The custom tool 'ProtoBufTool' failed." to generate the C# classes from within

protoc custom plugin erroring out with Program not found or is not executable

半城伤御伤魂 提交于 2020-06-09 05:37:45
问题 I am trying to build a custom protoc plugin to generate custom output from .proto files. I literally copied java file containing CodeGenerator from protoc custom plugin as a starting point and renamed it. I also followed executable and created .sh file. The content of my shell script is as follows. I also add the PATH variable value and output of the plugin execution. Can someone point me where I am going wrong with this? The shell script runs fine separately executing the main method 回答1:

How to Mask certain fields in Protobuf

落花浮王杯 提交于 2019-12-24 07:19:42
问题 I couldnt find a way to mask certain fields in protobuf structure. I did read about the FieldMaskUtil and tried few examples but it seems to do the reverse i.e copy fields which are mentioned in FieldMask which is different from what i wanted. Here's the sample structure and corresponding Test code. Proto: syntax = "proto3"; package model; option java_package = "test.demo.services.protobuf.customer.model"; option java_outer_classname = "CustomerProto"; message Accounts { repeated Account

Inheritance in protocol buffers

落爺英雄遲暮 提交于 2019-12-21 03:13:08
问题 How to handle inheritance in Google Protocol Buffers 3.0? Java equivalent code: public class Bar { String name; } public class Foo extends Bar { String id; } What would be Proto equivalent code? message Bar { string name = 1; } message Foo { string id = 2; } 回答1: Protocol Buffers does not support inheritance. Instead, consider using composition: message Foo { Bar bar = 1; string id = 2; } However, that said, there is a trick you can use which is like inheritance -- but which is an ugly hack,

Protobuf3: How to describe map of repeated string?

本小妞迷上赌 提交于 2019-12-03 19:13:08
问题 The Official documentation about map type says: map<key_type, value_type> map_field = N; ...where the key_type can be any integral or string type (so, any scalar type except for floating point types and bytes). The value_type can be any type . I want to define a map<string, repeated string> field, but it seems illegal on my libprotoc 3.0.0 , which complains Expected ">" . So I wonder if there is any way to put repeated string into map. A Possible workaround could be: message ListOfString {

Inheritance in protocol buffers

独自空忆成欢 提交于 2019-12-03 09:35:33
How to handle inheritance in Google Protocol Buffers 3.0? Java equivalent code: public class Bar { String name; } public class Foo extends Bar { String id; } What would be Proto equivalent code? message Bar { string name = 1; } message Foo { string id = 2; } Protocol Buffers does not support inheritance. Instead, consider using composition: message Foo { Bar bar = 1; string id = 2; } However, that said, there is a trick you can use which is like inheritance -- but which is an ugly hack, so you should only use it with care. If you define your message types like: message Bar { string name = 1; }