This is a pretty useless (if technically correct) message that the compiler gives if you try to parse the disqualified join value using Enum.TryParse
.
More precisely, if you look at this function, you will see that it is parameterized with a type that is limited to a value type with a standard constructor. DUs do not meet any of these criteria - this is what the compiler complains about.
When defining an enumeration in F #, unlike C #, you need to explicitly assign a value to each label:
type MyEnum = | Default = 0 | Custom = 1 | Fancy = 2
Skipping values will cause the compiler to interpret this type as a discriminatory union, which is a completely different beast.
source share