Using the solution showed in this question, System.Windows.Forms.Clipboard.SetText(...)
, results in the exception:
Current thread must be set to single thread apartment (STA) mode before OLE calls can be made
To prevent this, you can add the attribute:
[STAThread]
to
static void Main(string[] args)