Reputation: 3636
I have several .proto files with proto2 syntax. I am trying to auto-generate C# classes using the protoc compiler but I get the error: "C# code generation only supports proto3 syntax.
Other than manually updating each .proto file to conform to proto3 syntax, is there no other way to auto generate C# classes? I'm completely new to protobuf so I know this may sound like a weird question given that the compiler clearly states that I have to follow proto3 syntax - I'm just wondering if there was ever a workaround to getting C# classes to work with proto2 syntax.
Upvotes: 1
Views: 2757
Reputation: 1085
You can use the ancient/venerable protogen.exe from the protobuf-net 1.0.0.280 package to do the trick, or the slightly more modern, but still no longer maintained protobuf-csharp-port project.
Upvotes: 0