The struct, record or union type '{0}' implements the interface 'System.IComparable ' explicitly. You must apply the 'CustomComparison' ...

The struct, record or union type '{0}' implements the interface 'System.IComparable<_>' explicitly. You must apply the 'CustomComparison' attribute to the type, and should also provide a consistent implementation of the non-generic interface System.IComparable.