diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index ad6725f684a..46059b34a73 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -100,6 +100,7 @@ Condition=" '@(Protobuf)' != '' " DependsOnTargets=" Protobuf_BeforeCompile; Protobuf_ResolvePlatform; + _Protobuf_SetProtoRoot; _Protobuf_SelectFiles; Protobuf_PrepareCompile; _Protobuf_AugmentLanguageCompile; @@ -115,27 +116,33 @@ DependsOnTargets="Protobuf_Compile" Condition=" '$(Language)' == 'C#' " /> - + + files outside of project directory, use each .proto file's directory as the root + or Protobuf_ProtoRoot if set. --> + + + + + . + + %(RelativeDir) + + + + + + - - - - . - - - - %(RelativeDir) - + @@ -329,6 +336,7 @@