Skip to content

kunalm8470/Protobuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Protobuf

  • Navigate to the protobuf from GitHub releases page and download the protoc-<VERSION>-win64.zip for Windows, this includes a pre-built binary of the protoc tool, compiler etc.

  • Extract it, place it in some folder like C:\ and add the directory C:\protoc-<VERSION>-win64\bin to the path variable.

  • Verify whether added properly to path variable or not by typing in command prompt - protoc -help

  • Follow Google tutorial for Protobuf using C#.

  • Compile the .proto file to C# class

    protoc -I. --csharp_out=. ./addressbook.proto "This generates Addressbook.cs in the solution folder".

  • To compile this code, we need to reference the Google.Protobuf assembly.

    PM > Install-Package Google.Protobuf

  • Add using directives to Program.cs for generated class form compiler (if namespace if different), and Google.Protobuf.

Releases

No releases published

Packages

No packages published

Languages