Breaking News: Grepper is joining Read the official announcement!
Check it out

protoc generate grpc services c#

Solstice answered on August 10, 2023 Popularity 6/10 Helpfulness 5/10


More Related Answers

  • service in proto gRPC
  • protoc grpc-gateway protoc-gen-go protoc-gen-go-grpc protoc-gen-openapiv2 protoc-gen-grpc-gateway
  • Implementing the gRPC Client
  • go grpc protoc

  • protoc generate grpc services c#


    Unlike messages, protoc does not natively support code autogen for services. To create stubs for services, the grpc C# plugin is required.

    First, install the Grpc.Tools NuGet package from inside Visual Studio.

    Then navigate to <NuGetPackageInstallDir>/GrpcTools.x.xx.x/tools/<yourOS>

    If you wish, the grpc_csharp_plugin.exe can be moved to a more permanent/accessible location

    Two additional commands are required for the plugin to work.

    To make protoc aware of the plugin, include this command when invoking protoc:

    An output for the files must also be specified like so:

    Users who opt to manually generate their message and service C# code stubs may opt to uninstall the GRPC.Tools NuGet package after completing these steps

    Additional examples and tips can be found here:

    Popularity 6/10 Helpfulness 5/10 Language shell
    Link to this answer
    Share Copy Link
    Contributed on Aug 10 2023
    0 Answers  Avg Quality 2/10


    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.