-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
User feedback transferred from UUF System:
"The first build of the client is not possible.The type name 'GreeterClient' does not exist in the type 'Greeter' occurs."
**The following Problem/Solution is just an AI generated recommendation and should be treated as such: **
Problem Statement
The tutorial for creating a gRPC client and server in ASP.NET Core doesn't clearly explain that the GreeterClient
type is generated by the build process after setting up the .proto
file. Users may encounter the error "The type name 'GreeterClient' does not exist in the type 'Greeter'" if they try to use the generated client classes before a successful build has completed. The current tutorial doesn't emphasize the importance of building the project after adding the proto file and before writing client code.
Proposed Solution
Add a clearer explanation in the "Create the Greeter client" section that explicitly states the build process generates the necessary client types. Include troubleshooting information addressing the specific error message mentioned in the user feedback, explaining that this typically occurs when users try to use the client before building the project.
Suggested Changes
Add a note after the following existing note in the "Create the Greeter client" section (around line 196):
> [!IMPORTANT]
> You must build the client project before the C# client code is generated from the `.proto` file. If you try to use the `GreeterClient` type before building, you'll receive the error "The type name 'GreeterClient' does not exist in the type 'Greeter'". Make sure to perform a build after adding the proto file and updating the project file.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/grpc/grpc-start.md
Document ID
tutorials/grpc/grpc-start
Platform Id
aspnetcore
Article author
wpickett
Metadata
No response