Open
Description
What steps will reproduce the problem?
1. Generate the DescriptorProtoFile.cs , CSharpOptions.cs and Protocal.cs
I used
mono ProtoGen.exe -line_break=Unix
-output_directory=../PDServer/PDServer/protocal --proto_path=./proto
--include_imports ./proto/myproto.proto
2. Add all three files (DescriptorProtoFile.cs , CSharpOptions.cs and
Protocal.cs) to the project, and the Google.ProtocolBuffers.dll hit build.
3. I'm using
Monodevelop 2.8.8.1
mono version
Mono JIT compiler version 3.0.4 (tarball Thu Mar 7 10:40:07 UTC 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors.
www.mono-project.com
Running on OpenSuse openSUSE 12.3 (x86_64)
The .net 3.5 version of Google.ProtocolBuffers.dll
The cs files do compile under VS2012 and run and they are identical.
What is the expected output? What do you see instead?
I expect it to compile with out the following error.
/home/michael/test/test/DescriptorProtoFile.cs(37,37): Error CS0311: The type
`Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder' cannot be used as
type parameter `TBuilder' in the generic type or method
`Google.ProtocolBuffers.FieldAccess.FieldAccessorTable<TMessage,TBuilder>'.
There is no implicit reference conversion from
`Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder' to
`Google.ProtocolBuffers.IBuilder<Google.ProtocolBuffers.DescriptorProtos.FileOpt
ions,Google.ProtocolBuffers.DescriptorProtos.FileOptions.Builder>' (CS0311)
(test)
/home/michael/test/test/DescriptorProtoFile.cs(37,37): Error CS0311: The type
`Google.ProtocolBuffers.DescriptorProtos.MessageOptions.Builder' cannot be used
as type parameter `TBuilder' in the generic type or method
`Google.ProtocolBuffers.FieldAccess.FieldAccessorTable<TMessage,TBuilder>'.
There is no implicit reference conversion from
`Google.ProtocolBuffers.DescriptorProtos.MessageOptions.Builder' to
`Google.ProtocolBuffers.IBuilder<Google.ProtocolBuffers.DescriptorProtos.Message
Options,Google.ProtocolBuffers.DescriptorProtos.MessageOptions.Builder>'
(CS0311) (test)
NOTE: First error is on line 38 of the DescriptorProtoFile.cs none of the other
declarations fail only all the 'Options ones'
global::Google.ProtocolBuffers.DescriptorProtos.FileOptions
..MessageOptions
..FieldOptions
..EnumOptions
..EnumValueOptions
..ServiceOptions
..MethodOptions
Hopefully I'm missing something obvious.
What version of the product are you using? On what operating system?
Version 2.4.1.521 release binaries only.
Linux protoc --version
libprotoc 2.4.1
I simlinked protoc.exe to /usr/bin/protoc
Please provide any additional information below.
My test proto file is attached. Its a trimmed down version of the real one.
The source does compile and run fine under Visual Studio.
If you do not include DescriptorProtoFile.cs and CSharpOptions.cs in your
project it compiles fine but crashes when you receive your first packet and try
and decode it.
Original issue reported on code.google.com by [email protected]
on 21 Jun 2013 at 8:46
Attachments: