Grpc-dotnet: how to Bulid grpc Service and CLient in One project and one exe

Created on 17 Oct 2019  ยท  3Comments  ยท  Source: grpc/grpc-dotnet

hi I am using vs 2019 to creat gRPC service and Client within one project in c#,

    <Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
    <Protobuf Include="Protos\greet.proto" GrpcServices="Client" /> 

it seems not work and either-or;
but i just wanna to build my service and client to one EXE file. and how to do that?thx a lot

question

Most helpful comment

Just have it once and set GrpcServices to Both:

    <Protobuf Include="Protos\greet.proto" GrpcServices="Both" /> 

All 3 comments

Just have it once and set GrpcServices to Both:

    <Protobuf Include="Protos\greet.proto" GrpcServices="Both" /> 

Hi. Awesome. Fixed my issue. But where is the documentation for this โ“

Them is some on troubleshooting page. Will move it to the Protobuf on C# page - https://github.com/dotnet/AspNetCore.Docs/pull/19152

Was this page helpful?
0 / 5 - 0 ratings

Related issues

davidfowl picture davidfowl  ยท  6Comments

dariogriffo picture dariogriffo  ยท  5Comments

shawnwildermuth picture shawnwildermuth  ยท  4Comments

dominikjeske picture dominikjeske  ยท  4Comments

JamesNK picture JamesNK  ยท  3Comments