I’ve read the instruction for building protobuf-csharp-port using Mono under Linux/Unix system. I still can’t get it work and eventually I’ll open a thread to ask why, but that’s not the question of this post.
I’m using Windows to develop and I have successfully built protobuf-csharp-port using VS2010. The fact is that I need to use the generated C# classes from inside Unity3D, which requires to use Mono.
I have Mono 2.8 installed on my machine.
The question is:
is possible to build protobuf-csharp-port in Windows using MonoDevelop? I tried to simply import the VS2010 solution and compile it using Mono but it doesn’t works.
How can I do it?
EDIT
While trying to simply compile VS solution using MonoDevelop I got several errors. The first is in the following line of FieldMappingAttribute.cs:
public MappedType MappedType { get; private set; }
The error is the following:
FieldMappingAttribute.cs(40,40): Error CS0501:
‘Google.ProtocolBuffers.Descriptors.FieldMappingAttribute.MappedType.get’
must declare a body because it is not marked abstract or extern
(CS0501) (ProtocolBuffers)
You shouldn’t need to build the main protobuf-csharp-port project yourself… or if you do, you should be able to do that very rarely.
You don’t need to rebuild protobuf-csharp-port just to build the generated C# classes. Just add a reference to Google.ProtocolBuffers.dll, and you should be fine.
That said, I haven’t tested it on Mono for a while. It doesn’t do anything desperately tricky, but you should definitely test thoroughly.