lirivera
lirivera

Reputation: 46

Protobuf use option GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE

I'm trying to generate a .cs file from a proto file, however the generated file has code that my compiler does not support. I'm not able to upgrade compiler thus I've researched this option, though I'm not sure on how to transform my proto file using this option:

GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE

Details of the option can be found in this link.

Upvotes: 1

Views: 459

Answers (1)

Guru Stron
Guru Stron

Reputation: 143243

Try either adding DefineConstants XML node to .csproj:

<PropertyGroup>
    <DefineConstants>GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE</DefineConstants>
</PropertyGroup>

Or passing it as parameter to build: /p:DefineConstants="GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE"

Upvotes: 3

Related Questions