protobuf-csharp-port

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

Protobuf InvalidProtocolBufferException with some strings

北慕城南 提交于 2019-12-06 10:33:01
问题 We using protobuf v.3 to transfer messages from C# client to Java server over HTTP. The message proto looks like this: message CLIENT_MESSAGE { string message = 1; } Both client and server uses UTF-8 character encoding for strings. Everything is fine whe we are using short string values like "abc", but when we trying to transfer string with 198 chars in it, we catchig an Exception: com.google.protobuf.InvalidProtocolBufferException: While parsing a protocol message, the input ended

Automapper IEnumerable within class is not being mapped to RepeatedField

拈花ヽ惹草 提交于 2019-12-02 15:34:19
问题 I want to map between two classes: public class A { public IEnumerable<C> someList } and public class B { public RepeatedField<D> someList } where RepeatedField is a class from Google.Protobuf.Collections that handles gRPC data. EDIT: As it turns out, the way that gRPC creates classes via its prototype is not exactly like creating a class like B. See my answer. I create an Automapper MappingConfiguration like this return new MapperConfiguration(cfg => { cfg.CreateMap<C, D>().ReverseMap(); cfg

Automapper IEnumerable within class is not being mapped to RepeatedField

安稳与你 提交于 2019-11-29 18:07:48
I want to map between two classes: public class A { public IEnumerable<C> someList } and public class B { public RepeatedField<D> someList } where RepeatedField is a class from Google.Protobuf.Collections that handles gRPC data. EDIT: As it turns out, the way that gRPC creates classes via its prototype is not exactly like creating a class like B. See my answer. I create an Automapper MappingConfiguration like this return new MapperConfiguration(cfg => { cfg.CreateMap<C, D>().ReverseMap(); cfg.CreateMap<A, B>().ReverseMap(); }); and then it gets registered via ASP.NET Startup class. If I do