https://github.com/hanabi1224/protobuf.codegen.buildtask
MSBuild task to automatically generate c# files from .proto files
https://github.com/hanabi1224/protobuf.codegen.buildtask
protobuf protobuf-net protobuf3 protobuffer
Last synced: about 1 month ago
JSON representation
MSBuild task to automatically generate c# files from .proto files
- Host: GitHub
- URL: https://github.com/hanabi1224/protobuf.codegen.buildtask
- Owner: hanabi1224
- License: mit
- Created: 2019-01-16T04:28:26.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-16T16:22:35.000Z (over 6 years ago)
- Last Synced: 2025-04-14T13:21:25.326Z (about 1 month ago)
- Topics: protobuf, protobuf-net, protobuf3, protobuffer
- Language: C#
- Size: 32.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Protobuf.CodeGen.BuildTask
[](https://ci.appveyor.com/project/hanabi1224/protobuf-codegen-buildtask)
[](https://travis-ci.org/hanabi1224/Protobuf.CodeGen.BuildTask)
[](https://github.com/hanabi1224/Protobuf.CodeGen.BuildTask/blob/master/LICENSE)
[](https://www.nuget.org/packages/Protobuf.CodeGen.BuildTask)
====MSBuild task that automatically uses official protoc binary in [Google.Protobuf.Tools](https://www.nuget.org/packages/Google.Protobuf.Tools/) to generate c# files from .proto files. In order to build the generated c# files, it adds official [Google.Protobuf](https://www.nuget.org/packages/Google.Protobuf/) as indirect reference to your project as well
Install via [nuget](https://www.nuget.org/packages/Protobuf.CodeGen.BuildTask)
or add below code snippet to your .csproj file
Windows, Linux, OSX are all supported and tested
```
All
```
The generated files will be under obj/_ProtobufCodeGen folder, which will be gitignored by default.
The unit test project [here](https://github.com/hanabi1224/Protobuf.CodeGen.BuildTask/tree/master/test/Protobuf.CodeGen.BuildTask.Tests) is a good example to demonstrate the usage of this package.
As a side note, all the .proto files are also distributed together with the output dll as embedded resources, which can be inspected by tools like [ILSpy](https://github.com/icsharpcode/ILSpy).