bitcraftCoLtd / protobuf3-for-unity

Google Protocol Buffers runtime library version 3 for Unity (targeting .NET 3.5)
Other
333 stars 57 forks source link

Compiler for compatible C# classes #1

Closed mviranyi closed 8 years ago

mviranyi commented 8 years ago

protoc for .net3.5 compatible Protobuf runtime library

I was using the official protoc compiler for generating C# classes out of proto3 definitions from https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3. I'm now wondering how to generate .net3.5 protobuf compatible C# classes to use with your verison from it.

Is there a solution to that?

Workaround

So far I've found these steps to make protoc generated classes able to compile:

Can you think of more?

hobein commented 8 years ago

There is currently two branches on this repository, one for the beta-2 and another for the beta-3. Regarding your workaround description it seems you used our branch beta-2 with the code generated using the protoc beta-3.

We just switched the default branch of this repository to the v3.0.0-beta-3 Could you try to clone the repo fresh again and see if this fixes your issue.

protoc https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3

protobuf3-for-unity (just in case) https://github.com/bitcraftCoLtd/protobuf3-for-unity/tree/v3.0.0-beta-3

mviranyi commented 8 years ago

You're right. I've checked the last locally checked out branch it was the ...-beta-2 indeed. Changing it to -beta-3 or simply re-clone the current main branch fixes it! All Classes and Attributes generated by the protoc compiler from the v3.0.0-beta-3 tag are usable.

Thanks!

qbrandon commented 8 years ago

Thanks for checking! Do not hesitate to let us know if you face any other unexpected behavior.