/dotnetglobal-protoc

dotnet global tool for protoc

Primary LanguageC#

dotnet global tool for Protoc

Easy install protoc executable file.

Build status https://img.shields.io/badge/dotnet%20core-2.1-green.svg NuGet Pre Release

Google´s https://github.com/protocolbuffers/protobuf demands you to download and maintain specific versions of protoc.exe executables to generate C# code from .proto files.

There was no CLI installation, until now.

Installation

Windows:

https://www.nuget.org/packages/protoc

dotnet tool install --global protoc --version 3.6.1

to uninstall

dotnet tool uninstall --global protoc

Usage Example

protoc --version

To generate .cs from .proto

cd <proto files directory>
protoc --proto_path=. --csharp_out=. filename.proto

filename.cs will be generated on --csharp_out directory path.

For more examples and usage, please refer to google's protobuf csharp generated documentation.

Installation from source code

git clone https://github.com/lazarofl/dotnetglobal-protoc.git protoc
cd protoc
dotnet build
dotnet tool install -g --add-source bin\Debug\ protoc

Issues and Sugestions

https://github.com/lazarofl/dotnetglobal-protoc/issues

Contributing

  1. Fork it (https://github.com/lazarofl/dotnetglobal-protoc/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request