Hi, I presumably found a issue in the code that I would like to share the resolution.
The function MessageControlNumber (ParseNodeExtension.cs), is causing the GenerateEDI to crash in case the controlNumber.Value is null, which can happen even if controlNumber is not null (when the D_329_2 is not provided for S_ST).
So adding the code below (or something like that) before the return will inform the user about the requirement and will not crash the library:
throw new Exception("Element at position 1 on UNH or ST was not found.");