Open forconz opened 2 years ago
import 的路径要用完整的路径 例如:wechaty\puppet.proto
https://github.com/wechaty/grpc/blob/main/proto/wechaty/puppet.proto import "wechaty/puppet/base.proto"; import "wechaty/puppet/contact.proto"; import "wechaty/puppet/event.proto"; import "wechaty/puppet/friendship.proto"; import "wechaty/puppet/message.proto"; import "wechaty/puppet/room.proto"; import "wechaty/puppet/room_invitation.proto"; import "wechaty/puppet/room_member.proto"; import "wechaty/puppet/tag.proto"; 这个文件在C#项目里会出错,修改成下面,用完整的路径,就不报错了
import "proto/wechaty/Puppet/base.proto"; import "proto/wechaty/Puppet/contact.proto"; import "proto/wechaty/Puppet/event.proto"; import "proto/wechaty/Puppet/friendship.proto"; import "proto/wechaty/Puppet/message.proto"; import "proto/wechaty/Puppet/room.proto"; import "proto/wechaty/Puppet/room_invitation.proto"; import "proto/wechaty/Puppet/room_member.proto"; import "proto/wechaty/Puppet/tag.proto";
(Write your steps here:)
编译通过,生成代码
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 File not found. Wechat D:\Wechat\google\api\annotations.proto 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 File not found. Wechat D:\Wechat\protoc-gen-openapiv2\options\annotations.proto 1 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 Import "google/api/annotations.proto" was not found or had errors. Wechat D:\Wechat\Protos\Wechaty\puppet.proto 26 严重性 代码 说明 项目 文件 行 禁止显示状态 错误 Import "protoc-gen-openapiv2/options/annotations.proto" was not found or had errors. Wechat D:\Wechat\Protos\Wechaty\puppet.proto 27
proto的定义,在C#项目里有点问题,暂时不知道如何修复。
Windows10,vs.net 2019
Please refer to our .NET GitHub Action at https://github.com/wechaty/grpc/blob/main/.github/workflows/csharp.yml and I hope it can help you to solve your problem.
CC @wechaty/dotnet
🐛 Bug Report
import 的路径要用完整的路径 例如:wechaty\puppet.proto
https://github.com/wechaty/grpc/blob/main/proto/wechaty/puppet.proto import "wechaty/puppet/base.proto"; import "wechaty/puppet/contact.proto"; import "wechaty/puppet/event.proto"; import "wechaty/puppet/friendship.proto"; import "wechaty/puppet/message.proto"; import "wechaty/puppet/room.proto"; import "wechaty/puppet/room_invitation.proto"; import "wechaty/puppet/room_member.proto"; import "wechaty/puppet/tag.proto"; 这个文件在C#项目里会出错,修改成下面,用完整的路径,就不报错了
import "proto/wechaty/Puppet/base.proto"; import "proto/wechaty/Puppet/contact.proto"; import "proto/wechaty/Puppet/event.proto"; import "proto/wechaty/Puppet/friendship.proto"; import "proto/wechaty/Puppet/message.proto"; import "proto/wechaty/Puppet/room.proto"; import "proto/wechaty/Puppet/room_invitation.proto"; import "proto/wechaty/Puppet/room_member.proto"; import "proto/wechaty/Puppet/tag.proto";
To Reproduce
(Write your steps here:)
Expected behavior
编译通过,生成代码
Actual Behavior
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 File not found. Wechat D:\Wechat\google\api\annotations.proto 1
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 File not found. Wechat D:\Wechat\protoc-gen-openapiv2\options\annotations.proto 1
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 Import "google/api/annotations.proto" was not found or had errors. Wechat D:\Wechat\Protos\Wechaty\puppet.proto 26
严重性 代码 说明 项目 文件 行 禁止显示状态 错误 Import "protoc-gen-openapiv2/options/annotations.proto" was not found or had errors. Wechat D:\Wechat\Protos\Wechaty\puppet.proto 27
proto的定义,在C#项目里有点问题,暂时不知道如何修复。
Your Environment
Windows10,vs.net 2019