Last active
October 8, 2017 21:22
-
-
Save anujbhatt/8837506 to your computer and use it in GitHub Desktop.
Generating C# classes from .proto files on a Mac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat example.proto | |
message AMessage | |
{ | |
required int32 a=1; | |
optional int32 b=2; | |
} | |
$ protoc example.proto --descriptor_set_out=example.pb | |
$ mono ProtoGen.exe example.pb | |
$ more Example.cs | |
// Generated by the protocol buffer compiler. DO NOT EDIT! | |
using pb = global::Google.ProtocolBuffers; | |
using pbc = global::Google.ProtocolBuffers.Collections; | |
using pbd = global::Google.ProtocolBuffers.Descriptors; | |
using scg = global::System.Collections.Generic; | |
public static partial class Example { | |
... | |
... |
Where is the ProtoGen.exe?
thank you very much
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works fine