Open GoogleCodeExporter opened 9 years ago
Just to clarify, there are two steps here which can vary:
- Running ProtoGen
- Building the generated code
When you say that the source compiles under Visual Studio, do you mean the
exact same source that fails to compile with Mono, i.e. the source generated by
running "mono ProtoGen.exe ..."? Or source generated with a non-Mono ProtoGen
invocation?
Original comment by jonsk...@google.com
on 21 Jun 2013 at 8:50
Ok the source that generated is checked into Git. It compiles on windows but
not on Mono.
I ran some more tests and the .cs files generated by windows ProtoGen are
identical to those generated by calling "mono ProtoGen.exe..." I checked them
in beyond compare, and then to be really paranoid did md5sums and they are the
same.
Dose that make this a mono issue?
Original comment by micha...@posdroid.com
on 21 Jun 2013 at 9:58
If the same source compiles with Microsoft's C# compiler but not Mono's, that
definitely makes it sound like a problem *either* with the Mono compiler *or*
with however you're building with it.
Original comment by jonathan.skeet
on 21 Jun 2013 at 10:10
I agree.
I have created a bran new 'blank' console project I add the three generated .cs
files to it and the reference to the Google.ProtocolBuffers.dll and I still get
the issue above.
However in Mono's defence It's does compile up the rest of our program without
issue.
I'm checking out the latest monodevelop and will see if that helps ( onces it's
all complied up).
If that dosn't work I'll see about compiling it from the command line <gulp> :).
Cheers
Michael.
Original comment by micha...@posdroid.com
on 21 Jun 2013 at 10:35
Well no luck by moving MonoDevelop to 4.1.4 and mono is
Mono JIT compiler version 3.0.4
I have tried changing the .Net version it's compiled against 2/3/3.5/4/4.5
You can see how it is being compiled here ( command line )
http://pastebin.com/94d8SXWD
If you can see any problems please let me know otherwise I'll have to see if I
can dig a little deeper under the hood.
Michael
Original comment by micha...@posdroid.com
on 21 Jun 2013 at 11:12
Ok the generated DescriptorProtoFile.cs fails under Mono C# compiler version
3.0.4.0
This is the version Running on OpenSuse openSUSE 12.3 (x86_64), at least on
_my_ machine
However it works under
Mono C# compiler version 2.10.2.0 (offical Mono stable)
and 2.10.8.1 (Ubuntu 12.10)
I hope this helps someone else.
Michael
Original comment by micha...@posdroid.com
on 22 Jun 2013 at 8:53
Thanks. I remember seeing some problems getting it to compile under Mono
before, but I thought it was all fixed. I'll try to find some time to look into
it.
Original comment by jonathan.skeet
on 22 Jun 2013 at 9:17
Hang on - you say you were compiling DescriptorProtoFile.cs? You don't need to
do that - that contains types which are already present in
Google.ProtocolBuffers.dll. I suspect that's the problem; the compiler is
getting confused between the different types involved.
Both DescriptorProtoFile.cs and CSharpOptions.dll are already compiled into
Google.ProtocolBuffers.dll, and should *not* be included into your project.
Can you confirm that there's no problem just compiling the *other* files?
(Protocal.cs in the sample you've given.)
Original comment by jonathan.skeet
on 13 Aug 2013 at 6:17
Original issue reported on code.google.com by
micha...@posdroid.com
on 21 Jun 2013 at 8:46Attachments: