I'm using Google.Protobuf.Tools in a C# .NET Standard project MyProject
. I have multiple proto definitions.
MyProject/Protos/Requests/SampleRequest.proto
syntax = "proto3";
option csharp_namespace = "My.Projects.Protos.Requests";
package sampleRequests;
message SampleRequest {
int32 requestNumber =1;
SubRequest request =2;
}
MyProject/Protos/Requests/SubRequest.proto
syntax = "proto3";
option csharp_namespace = "My.Projects.Protos.Requests";
package subRequests;
message SubRequest {
int32 SubId =1;
string requestText =2;
}
Now, this code would not compile and the error shown is SubRequest is unknown.
I would like to know how to import a different proto file so that I can achieve this. I don't really understand --proto_path
cli options and could not find any clear documentation around this.
Any help is much appreciated. Thanks in advance. Thanks in advance.