michaeledgar / protobuf-net

Automatically exported from code.google.com/p/protobuf-net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Proto-Tool fails on Enums without Defaults

GoogleCodeExporter opened this issue · comments

When I have a *.proto-file containing a message with a field of an enum type 
defined before, but give no default value of the enum to this field, 
the Visual Studio Proto-Tool seems to fail. 

Creating C#-Code, it creates the private member with the field name, setting it 
to "EnumName.", and it includes a DefaultValue-Attribute also set to 
"EnumName.". both leads to a compile error, making it necessary to add a valid 
value manually. 
I attached to pictures, showing the issue. 

Are you able to provide an update, so this problem gets solved?

You can contact me under 
thomas.meschke@gmail.com

Kind regards, 
Thomas.

Original issue reported on code.google.com by Thomas.Meschke on 19 Jun 2013 at 11:19

Attachments:

I'm able to duplicate this issue using the attached .proto file by using the 
following protogen invocation:

"C:\Program Files (x86)\protobuf-net\protobuf-net-VS9\protogen.exe" 
-ns:CorrugatedIron.Messages -i:riak.proto -o:riak.cs

Original comment by jerem...@brentozar.com on 1 Sep 2013 at 3:42

Attachments: