I have a simple gRPC app. I have 2 proto files.
1. greet.proto
syntax = "proto3";
import "protos/common.proto";
option csharp_namespace = "Module.SubModule.API";
package greet;
service Greeter {
rpc SayHello (HelloRequest) returns (HelloReply);
}
message HelloRequest {
string name = 1;
}
message HelloReply {
string message = 1;
Error error = 2;
}
2. common.proto
syntax = "proto3";
option csharp_namespace = "Module.SubModule.API";
package greet;
message Error {
int32 status_code = 1;
}
File Structure
Project File Entry
<ItemGroup>
<Protobuf Include="Protos\common.proto" GrpcServices="Server" />
<Protobuf Include="Protos\greet.proto" GrpcServices="Server" />
</ItemGroup>
When I run the app and then use grpcui localhost:5001
, I get the below error message
Failed to compute set of methods to expose: Symbol not found: greet.Greeter
caused by: File not found: protos/common.proto
Can anyone help out here? The common.proto file is in the same directory and the app runs fine without any build errors. But when using gRPCUI, I get this.