* Rewrite Grpc.Tools BUILD-INTEGRATION.md docs * Minor edits to text * various adjustments and typos for Grpc.Tools readme * Updated with review suggestions * Further refinements to the docs * Add README for Grpc.Tools package * Update BUILD-INTEGRATION.md * Updated from review comments Co-authored-by: Jan Tattermusch <jtattermusch@google.com> |
||
|---|---|---|
| .. | ||
| Properties | ||
| build | ||
| Common.cs | ||
| CommonPlatformDetection.cs | ||
| DepFileUtil.cs | ||
| GeneratorServices.cs | ||
| Grpc.Tools.csproj | ||
| ProtoCompile.cs | ||
| ProtoCompilerOutputs.cs | ||
| ProtoReadDependencies.cs | ||
| ProtoToolsPlatform.cs | ||
| README.md | ||
| SourceLink.csproj.include | ||
| implementation_notes.md | ||
README.md
Grpc.Tools - Protocol Buffers/gRPC C# Code Generation Build Integration
This package provides C# tooling support for generating C# code from .proto files in .csproj projects:
- It contains protocol buffers compiler and gRPC plugin to generate C# code.
- It can be used in building both grpc-dotnet projects and legacy c-core C# projects.
The package is used to automatically generate the C# code for protocol buffer messages
and gRPC service stubs from .proto files. These files:
- are generated on an as-needed basis each time the project is built.
- aren't added to the project or checked into source control.
- are a build artifact usually contained in the
objdirectory.
This package is optional. You may instead choose to generate the C# source files from
.proto files by running the protoc compiler manually or from a script.
Simple example
To add a .proto file to a project edit the project’s .csproj file and add an item group with a <Protobuf> element that refers to the .proto file, e.g.
<ItemGroup>
<Protobuf Include="Protos\greet.proto" />
</ItemGroup>
For more complex examples and detailed information on how to use this package see: BUILD-INTEGRATION.md