c# 根据proto文件自动生成代码配置

选中proto文件 右键属性 设置编译动作 protobuf编译

grpc存根根据实现角色配置

c# proto文件导入报错 File not found. Import "common.proto" was not found or had errors.

 

生成时报错:

File not found.

Import "common.proto" was not found or had errors.

c# proto文件导入报错 File not found. Import "common.proto" was not found or had errors.

 

 

 修改csproj文件 

c# proto文件导入报错 File not found. Import "common.proto" was not found or had errors.

 

指定proto文件根目录  ProtoRoot="protos\"

 c# proto文件导入报错 File not found. Import "common.proto" was not found or had errors.

 

 

 

参考:

https://stackoverflow.com/questions/21134066/error-using-import-in-proto-file/59746779#59746779

 

相关文章:

  • 2021-06-29
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
猜你喜欢
  • 2021-12-03
  • 2021-10-31
  • 2022-12-23
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案