Report a bug

32 views
Skip to first unread message

ykwd.t...@gmail.com

unread,
Feb 19, 2016, 6:57:10 PM2/19/16
to Protocol Buffers
Hi, 

Protobuf is a nice work which saves me a lot of time.

Through my using, I find a bug as the following : 

In some csharp source files such as csharp/src/Google.Protobuf/Reflection/FieldDescriptor.cs, there are some codes like :

throw new DescriptorValidationException(this, $"\"{Proto.TypeName}\" is not an enum type.");

or 

string IDescriptor.FullName => Name;

It seems that this is due to mistakes in automatic code generation.

These codes cause the csharp project building failed.

This bug first occurs at the submission of  72ec33676fd40ccfe719ace162fcf859ae9251bc.

I don't know if this is the right place to report bugs. I'm sorry if not, can anyone tell me how to report it.

Thanks.

Jon Skeet

unread,
Feb 20, 2016, 9:40:21 AM2/20/16
to Protocol Buffers
In general, you'd report a bug at https://github.com/google/protobuf/issues

... but in this case there's no bug. This is perfectly valid C# 6, which is required to build the Google.Protobuf library.
The code generated by protoc doesn't use C# 6, so you should be fine with whatever you generate, and the fact that the library uses C# 6 won't stop the compiled code from being used by older versions of Visual Studio etc.

Basically, we require Visual Studio 2015 (or the equivalent version of the Mono compiler) for Google.Protobuf itself.

Jon

GoldenBull Chen

unread,
Feb 20, 2016, 10:01:47 AM2/20/16
to ykwd.t...@gmail.com, Protocol Buffers
Welcome to the new world of C# 6 and VS2015 :)
These new syntax sugars will make your coding life easier.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

ykwd.t...@gmail.com

unread,
Feb 21, 2016, 9:46:28 PM2/21/16
to Protocol Buffers
Thank you for your kind answer to my stupid question. I successfully compile it now.

I have installed both vs2013 and vs2015. Since the 2nd line in the .sln file says "# Visual Studio 2013", the vs version selector automatically start vs2013 to open this project. One can either mannually select vs2015 to open it,  or change this line to "# Visual Studio 2015" to automatically use vs2015 each time.

ykwd.t...@gmail.com

unread,
Feb 21, 2016, 9:49:35 PM2/21/16
to Protocol Buffers, ykwd.t...@gmail.com
Thank your very much. I had considered I know c#. Learning is infinite!

Jon Skeet

unread,
Feb 22, 2016, 7:56:36 AM2/22/16
to Protocol Buffers
Right - will do that, yes.
Reply all
Reply to author
Forward
0 new messages