mayankanup/grpc-client
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Create console client
$dotnet new console -o grpc-client
Now install 3 packages to client project
$dotnet add .\grpc-client.csproj package Grpc.Net.Client
$dotnet add .\grpc-client.csproj package google.protobuf
$dotnet add .\grpc-client.csproj package Grpc.Tools
Create Proto files in a folder ex. Protos
Change csproj file to include proto files in item group
<Protobuf Include="Protos\greet.proto" GrpcServices="Client" />
To build
$dotnet build
To run
$dotnet run
Sample output
PS C:\anup\work\code\grpc-client> dotnet run
Greeting: Hello Anup