Переглянути джерело

use GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE for C# distribtest that tests classic .csproj

Jan Tattermusch 5 роки тому
батько
коміт
42f741ecc4
1 змінених файлів з 6 додано та 0 видалено
  1. 6 0
      test/distrib/csharp/DistribTest/DistribTest.csproj

+ 6 - 0
test/distrib/csharp/DistribTest/DistribTest.csproj

@@ -56,6 +56,12 @@
     <Prefer32Bit>true</Prefer32Bit>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup>
+    <!-- this project is built with a legacy C# compiler, so ref structs are not supported.
+         Use GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE to still allow building the protobuf
+         generate code -->
+    <DefineConstants>$(DefineConstants);GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE</DefineConstants>
+  </PropertyGroup>
   <ItemGroup>
     <Reference Include="Grpc.Auth">
       <HintPath>..\packages\Grpc.Auth.__GRPC_NUGET_VERSION__\lib\net45\Grpc.Auth.dll</HintPath>