Google Protobuf – Generate C# POCO from .proto files using Protobuf-net

Google’s Protobuf code generator uses an API that many .NET developers may find a bit different than the usual MO.

An alternative to Google’s Protobuf implementation is Marc Gravell’s protobuf-net library, which uses an implementation that may make more sense to .NET developers. However, the code generator for this library is nowhere to be found in the nuget package. You can download it here.

The following is an example of executing the CLI tool

protogen -i:input.proto -o:output.cs