When generating C# code with the nullable option invalid setter code is generated for enum fields which have a default value (and thus still need an isset flag).
For example use the Work struct from tutorial.thrift and add a default value to the enum field:
Then the generated code in Work.cs looks like this:
This code is invalid, because value is of type Operation?, the correct code should be:
I believe the error is located in file t_csharp_generator.cc in function t_csharp_generator::generate_csharp_property:
Here use_nullable is set to true for all base types other then string, but not for enums.
A quick fix might be to add