Tag Archives: File not found. Import “common.proto” was not found or had errors.

C# proto Import Files Error: File not found. Import “common.proto” was not found or had errors.

C# automatically generate code configuration according to proto file

Select the proto file right-click attribute to set the compilation action protobuf compilation

The grpc stub is configured according to the implementation role

Generate an error:

File not found.

Import “common.proto” was not found or had errors.

Modify csproj file

Specify the root directory of the proto file   ProtoRoot=”protos\”