Easy install protoc executable file.
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.
Windows:
https://www.nuget.org/packages/protoc
dotnet tool install --global protoc --version 3.6.1
to uninstall
dotnet tool uninstall --global protoc
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.
git clone https://github.com/lazarofl/dotnetglobal-protoc.git protoc
cd protoc
dotnet build
dotnet tool install -g --add-source bin\Debug\ protoc
https://github.com/lazarofl/dotnetglobal-protoc/issues
- Fork it (https://github.com/lazarofl/dotnetglobal-protoc/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request