I am getteing an error 
error CS1001: Identifier expected
when I generate a .cs file from this .proto file. How can I fix this and 
make it compile?

message Person { 
required int32 id = 1; 
optional string name = 2;
optional string motto = 3 [default="When the cat is away, the mouse is 
enum Gender{ 
MALE = 1;
optional Gender gender = 4;
using protogen.exe -i:person.proto -o:person.cs

this generates a c# source file that has compilation errors:

    private Person.Gender _gender = *Person.Gender.;*
    [global::ProtoBuf.ProtoMember(4, IsRequired = false, Name=@"gender", 
DataFormat = global::ProtoBuf.DataFormat.TwosComplement)]
    public Person.Gender gender
      get { return _gender; }
      set { _gender = value; }

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To view this discussion on the web visit 
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to