Эх сурвалжийг харах

use GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE for C# distribtest that tests classic .csproj

Jan Tattermusch 5 жил өмнө
parent
commit
42f741ecc4

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

@@ -56,6 +56,12 @@
     <Prefer32Bit>true</Prefer32Bit>
     <Prefer32Bit>true</Prefer32Bit>
     <WarningLevel>4</WarningLevel>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   </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>
   <ItemGroup>
     <Reference Include="Grpc.Auth">
     <Reference Include="Grpc.Auth">
       <HintPath>..\packages\Grpc.Auth.__GRPC_NUGET_VERSION__\lib\net45\Grpc.Auth.dll</HintPath>
       <HintPath>..\packages\Grpc.Auth.__GRPC_NUGET_VERSION__\lib\net45\Grpc.Auth.dll</HintPath>