Restrict workaround to MSBuild 15.0 and above

pull/18678/head
John Luo 6 years ago
parent a2421cdeb1
commit d74f04680f
  1. 9
      src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets

@ -40,10 +40,11 @@
</ItemGroup>
<!-- Workaround for VS Project System bug: -->
<!-- Duplicated items in None itemgroup without Generator attribute prevents the items -->
<!-- in Protobuf itemgroup with Generator attribute from triggering design time build. -->
<ItemGroup Condition=" '$(DisableProtobufDesignTimeBuild)' != 'true' " >
<!-- Working around this by removing the duplicated items from None itemgroup. -->
<!-- Duplicated items in None itemgroup without Generator attribute prevents the items in Protobuf -->
<!-- itemgroup with Generator attribute from triggering design time build. Working around this by -->
<!-- removing the duplicated items from None itemgroup. The Remove attribute was introduced -->
<!-- in the .NET Framework 3.5, but was only supported inside targets until MSBuild 15.0. -->
<ItemGroup Condition=" '$(MSBuildVersion)' &gt;= '15.0' and '$(DisableProtobufDesignTimeBuild)' != 'true' " >
<None Remove="@(Protobuf)" />
</ItemGroup>

Loading…
Cancel
Save