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 40c5d5bd3dc..8b286593647 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -259,9 +259,11 @@ Condition=" '$(DisableProtobufDesignTimeBuild)' != 'true' " DependsOnTargets="Protobuf_PrepareCompileOptions;_Protobuf_GatherStaleFiles"> - - - + + <_Protobuf_ExpectedGenerated Include="@(Protobuf_ExpectedOutputs)" + Condition = " '%(Source)' != '' and '@(_Protobuf_OutOfDateProto)' != '' " /> + +