Includes between proto files

34 views
Skip to first unread message

alej...@theengineering.company

unread,
Apr 3, 2019, 4:41:38 AM4/3/19
to grpc.io

I'm trying to use protobuf + GRPC in a Visual C# project (windows). It all works fine if my proto files (which are external references outside of the project) are self-contained (no imports) or reference any well-known protos. However, I'm struggling to add imports between proto files in my project.


In CLI, I can just use the -I= option to include my Bazel workspace path, but in VS I don't want to manually add pre-build steps for every file that imports other proto files in the project.


Is there any way to add an import directory to the internal build step performed by Grpc.Tools to generate C# code from the proto files? I couldn't find any information about it online.

Jan Tattermusch

unread,
Apr 11, 2019, 5:41:14 AM4/11/19
to grpc.io
You should be able to use "ProtoRoot" property from https://github.com/grpc/grpc/blob/master/src/csharp/BUILD-INTEGRATION.md and import should work fine.
Reply all
Reply to author
Forward
0 new messages