avchs / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
Other
0 stars 0 forks source link

Proto-Tool fails on Enums without Defaults #388

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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:

GoogleCodeExporter commented 8 years ago
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: